alter table t add i int identity(1,1)
解决方案 »
- 如此问题如何解决
- 两数据库同步--------急!!!!!!!!
- 我正在写一个软件的开发与使用文档,前言部分应该写什么?
- 我如何才能刪聊自動產生的系統程儲過程呀,我確認那個過程是沒有用的了。
- 急--远程视图!
- 企业管理器里创建的数据库刷新后为什么在查询分析器里显示不出?
- yesterday2000(一笑而过):你试试一下
- 在SQL里面怎样才能让一个数字四舍五入成两位小数?
- 请问大家,SQL Server的image字段怎么读写到image控件,不是dbimage.
- 求救,关于BCP
- 刚买了张sqlserver2000光盘,有四个版。应该装那个版本?
- 装SQl SERVER装不上去,在最后关头出现配置服务器出错?
列名 int identity(1,1)
go
insert into t
select 'a'
union all
select 'b'
union all
select 'c'
select * from t
go
alter table t add i int identity(1,1)
go
select * from tdrop table t(所影响的行数为 3 行)code
------------------------------
a
b
c(所影响的行数为 3 行)
(所影响的行数为 3 行)code i
------------------------------ -----------
a 1
b 2
c 3(所影响的行数为 3 行)
列名 int identity(1,1)就可以了
列名 int identity(1,1)