SQL test

create table test

(testId int primary key identity(1,1),--testId字段从1开始每次自增1

 testName varchar(30),

 testPass varchar(30),

 insert into test(testName,testPass) values('ming','111'),

 insert into test(testName,testPass) select testName,testPass from test--反复复制成倍增加记录

select count(*) from test

select * from test

select testId from fron test

select top 6 * from test where testId not int(select top 99 testId from test)

 

posted @ 2011-10-18 13:05  残星  阅读(277)  评论(0编辑  收藏  举报