能过SQL语句怎么样设置主键? alter table 你的表 add constraint 主键名 primary key (列名) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 create table tb( ID int)go--添加not null 约束alter table tb alter column ID int not nullgo--设置主键alter table tb add primary key(ID)go--删除测试环境drop table tb sql server 中的数据储存问题 数据库连接错误[急] 求一条简单的SQL语句。。郁闷中。。 存储过程添加多条记录 晕呀,数据库备份出错了。。。。。。。。。。。。。。。。。。。。。。。。 求高手指点,sql语句,如何补充一列数据? select嵌套问题 关于因为该列没有包含在聚合函数或 GROUP BY 子句中。 关于通过存储过程创建指定表名的问题,请高手指点。 求SQL语句 (表2的记录覆盖表1中的记录) 更新多行条件相同数据,如何只更新一行呢? 今天启动sqlagent 服务时发现启动后出现DOS窗口
(
ID int
)
go--添加not null 约束
alter table tb alter column ID int not null
go--设置主键
alter table tb add primary key(ID)
go--删除测试环境
drop table tb