摘要:
列名Id test no 1 hello 1 1 Jack 2 1 you 3 2 My 1 2 is Lilei 3 2 name 2如要得到以下结果:1 hello Jack you 2 My name is Lilei请写出sql语句我写的如下: DECLARE @tempTable TABLE ( id INT PRIMARY KEY, field NVARCHAR(500) NULL)D... 阅读全文
摘要:
一是查询A(ID,Name)表中第31至40条记录,ID作为主键可能是不是连续增长的列,完整的查询语句如下: select top 10 * fromA where ID >(select max(ID) from (select top 30ID fromA order by A) T) order by A以上转自:http://www.cnblogs.com/foson/service... 阅读全文