常用数据库查询前10条记录
2014-11-07 17:04
218 查看
access:
select top (10) * from table1 where 1=1
db2:
select column from table where 1=1 fetch first 10 rows only
mysql:
select * from table1 where 1=1 limit 10
sql server:
读取前10条:select top (10) * from table1 where 1=1
读取后10条:select top (10) * from table1 order by id desc
oracle:
select * from table1 where rownum<=10
select top (10) * from table1 where 1=1
db2:
select column from table where 1=1 fetch first 10 rows only
mysql:
select * from table1 where 1=1 limit 10
sql server:
读取前10条:select top (10) * from table1 where 1=1
读取后10条:select top (10) * from table1 order by id desc
oracle:
select * from table1 where rownum<=10
相关文章推荐
- 常用几种数据库,取前10条记录的sql语句写法
- 常用几种数据库,取前10条记录的sql语句写法
- 常用几种数据库,取前10条记录的sql语句写法
- 常用几种数据库,取前10条记录的sql语句写法
- 常用几种数据库,取前10条记录的sql语句写法
- 几种数据库查询前10条记录的方法
- SQL语句,查询数据库中间连续的记录
- 学习数据库:SqlServer 2005之查询第m至第n条记录
- 【转贴】不同数据库查询前几条记录的SQL语句
- 转 查询前几条记录SQL在不同数据库中的用法
- SQL查询数据库中每张表的记录数!
- 数据库语句大全之查询前若干名数据/周期日期/大小/逻辑/重复记录查询
- 随机查询数据库中多N条记录
- 当某个表中存在标志表格中记录不同状态的判断性字段的时候,采用两种不同的数据库组织形式,查询执行速度的实验。
- 当某个表中存在标志表格中记录不同状态的判断性字段的时候,采用两种不同的数据库组织形式,查询执行速度的实验。
- 查询前几条记录在不同数据库中的用法
- ASP.NET2.0中插入、删除、查询、修改记录这么多方法,究竟哪种最通用,最常用?
- 查询前几条记录SQL在不同数据库中的用法
- 查询前几条记录SQL在不同数据库中的用法
- 查询数据库中重复的记录的SQL: