首要的关键 [英] Primary key
本文介绍了首要的关键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
创建表后,我可以将列声明为主键吗?是否可以向我发送该
Can i declare a column as a primary key after creating the table? Can u send me the syntax for that
推荐答案
的语法,您可以..
yes you can..
Create table testTable (userID int not null, userName varchar(20))
--now if you want to make UserID as primary key, then
alter table testTable add constraint pk_userID primary key (userID)
这篇关于首要的关键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文