不想取主键,但又想把取得的每条记录区别开来,有什么办法?
?
[解决办法]
group by 主键
[解决办法]
identity column
[解决办法]
identity column
[解决办法]
create table T(column1 varchar(100),column2 varchar(100))
insert into T select 'aaaa ', '111111 '
insert into T select 'aaaa ', '111111 '
insert into T select 'bbbb ', '111111 '
insert into T select 'bbbb ', '222222 '
--借助临时表,如下:
select *,identity(int,1,1) as ID
into #tp
from T
--查询数据
select * from #tp
drop table T,#tp
[解决办法]
数据窗口中加个计算列
getrow()