查询数据库表中前10条记录怎么写呢?
来源:百度知道 编辑:UC知道 时间:2024/05/24 21:29:43
查询数据库表中前10条记录怎么写呢?
查询前十条记录(顺数)select top 10 * form 表 where ..." '也可以不要后面的where子句
查询后十条记录(倒数)select top 10 * form 表 where ... order by id desc"'注:ID是数据库自动编号
select top 10 * from 表名
UC知道是一部内容开放、自由的互动网络百科全书
客观、专业、权威的知识性百科全书
来源:百度知道 编辑:UC知道 时间:2024/05/24 21:29:43
查询前十条记录(顺数)select top 10 * form 表 where ..." '也可以不要后面的where子句
查询后十条记录(倒数)select top 10 * form 表 where ... order by id desc"'注:ID是数据库自动编号
select top 10 * from 表名