如题
谢谢!!!
谢谢!!!
解决方案 »
- sql查找字段中的重复字符串个数
- 高分求助:求一个触发器,请指点一下!
- 存储过程可以用变量表示 表名吗?(在线等)
- 问一个ORACLE上的SQL语句
- 两个不同查询条件的语句,怎么并列
- IC商务助手的数据库SQL2000的MSDTC服务自动运行?
- SQL Server2000,如何令一个库的一个角色获得对该库所有表(系统表除外)的增删改查权限?
- 服务管理器的启动
- 题外话,有何软件可修改PDF文件
- vfp问题thisform.grid1.refresh为什么没有刷新
- 如何在sql语句中设置字段内容的格式呀?比如:数值为0则不显示,保留小数点位数为几位.
- 使用复制数据库向导中,出现CDW错误信息!SQL SERVER服务正在本地系统帐户下运行。需要更改SQL SERVER服务帐户才能有权复制网上文件。
ALTER TABLE T_test
ADD ID int IDENTITY(1,1)
用identity列
from 表 a
from 表
是新生一列,值等于该列从1排下来的顺序!wscft(努力工作,开心生活!) 我试了 说有语法错误,还没找到错误!!
insert into @t select '11'
insert into @t select '221'
insert into @t select '21'
insert into @t select '4'
insert into @t select '55'
insert into @t select '66'select [id]=identity(int,1,1),* into # from @t
select * from #
drop table #
select *, IDENTITY(int, 1,1)
from 表
正确的写法应该是
select *,identity(int,1,1) as [id] into #表名1 from 表名2
哈哈又学到东西