答:解1: select top 10 * from A where id not in (select top 30 id from A) 解2: select top 10 * from A where id > (select max(id) from (select top 30 ...
SQL 查询表中 到 的记录,考虑id不连续的情况 写出一条sql语句输出users表中 到 记录 数据库为SQL Server,以自动增长的ID作为主键,注意ID可能不是连续的 ...
2014-02-18 03:19 3 1929 推荐指数:
答:解1: select top 10 * from A where id not in (select top 30 id from A) 解2: select top 10 * from A where id > (select max(id) from (select top 30 ...
一条Sql语句:取出表A中第31到第40记录 写出一条Sql语句:取出表A中第31到第40记录(SQLServer,以自动增长的ID作为主键,注意:ID可能不是连续的。答: 解1: select top 10 * from A where id not in (select ...
平常工作,尤其是面试中经常遇到这样一个问题,查询表A中31到40条的记录,ID可能是不连续的。(via:女孩礼物网) 如果ID连续 如果ID不连续,提供三种写法 ...
SqlServer中怎么删除重复的记录(表中没有id) 其实我在别的网址也查到过删除重复的记录,不知道我是我SqlServer2012版本太低还是啥原因 delete from scwhere (c#,s#) in (select c#,s# from sc group by c#,s# ...
...