SQL2000 用SQL语句插入标识列.(表中没有标识列)

g75510118 2009-06-22 10:35:45
SQL2000 用SQL语句插入标识列.(表中没有标识列)

在线等~!
...全文
142 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
Jamin_Liu 2009-06-22
  • 打赏
  • 举报
回复
修改表結構加一個標識列或者每次插入時獲取最大編號+1
ChinaJiaBing 2009-06-22
  • 打赏
  • 举报
回复

select *,identity(int,1,1) into # from 表
Mr_Nice 2009-06-22
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 gaojier1000 的回复:]
SQL code
alter table tb add id int identity(1,1)


[/Quote]


???
  • 打赏
  • 举报
回复
alter table tb add id int identity(1,1)
feixianxxx 2009-06-22
  • 打赏
  • 举报
回复
alter table tb add id int identity(1,1)~~
xiequan2 2009-06-22
  • 打赏
  • 举报
回复

alter table tb add id int identity(1,1)
--小F-- 2009-06-22
  • 打赏
  • 举报
回复
??
identity(1,1)

34,873

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧