编程论坛
注册
登录
编程论坛
→
SQL Server论坛
编序号问题
nixy
发布于 2007-09-20 07:45, 832 次点击
可以用语句编序号吗?语句怎么写?
7 回复
#2
sky_yang_sky
2007-09-20 09:18
你是指ID號嗎,如果是那在創建表的時候用identity(1,1)
#3
nixy
2007-09-20 15:03
我说的是用语句编ID码啊
#4
thllilac
2007-09-20 16:51
select identity(1,1) as 序号,sname,sage from tStudent
#5
nixy
2007-09-20 17:44
照东土大唐哥哥的写法提示:
服务器: 消息 170,级别 15,状态 1,行 1
Line 1: Incorrect syntax near '1'.
#6
purana
2007-09-20 18:00
select id=identity(int,1,1),EmployeeID into #tbl_temp from orders
select * from #tbl_temp
drop table #tbl_temp
#7
nixy
2007-09-20 21:49
谢谢版主
#8
topcool
2007-09-21 17:32
identity函数
1