还有一种简单的方法,还是用临时表,只不过该临时表不用手工建立。 没办法的,IDENTITY ( data_type [ , seed , increment ] ) 函数需要用在有into的语句中。Example :select IDENTITY(int,1,1) as FIndex,.... Into #t_Queery From TableName Where ...select * from #t_Querrydrop table #t_Querry
Oracle: insert into tab2 select rownum as ID,Telnum from tab1;
我近日看了一下Advanced T-SQL,终于找到了解决办法:select Num_ID=count(*),x.PhoneNo from dbTelNo x,dbTelNo y where y.PhoneNo<=x.PhoneNo group by x.PhoneNo很遗憾,不能给大家加分了,但还是要谢谢你们。
没办法的,IDENTITY ( data_type [ , seed , increment ] ) 函数需要用在有into的语句中。Example :select IDENTITY(int,1,1) as FIndex,.... Into #t_Queery From TableName Where ...select * from #t_Querrydrop table #t_Querry
insert into tab2 select rownum as ID,Telnum from tab1;
from dbTelNo x,dbTelNo y
where y.PhoneNo<=x.PhoneNo
group by x.PhoneNo很遗憾,不能给大家加分了,但还是要谢谢你们。