sql 查询第一条记录,和最后一条记录。
查询第一条记录,和最后一条记录。
谢!谢!
[解决办法]
select top 1 * from tb order by id
select top 1 * from tb order by id desc
[解决办法]
SELECT * FROM (select top 1 * from tb order by id )xUNION ALL SELECT * FROM (select top 1 * from tb order by id desc)x
[解决办法]
top
和排序就可以了
[解决办法]
哦
[解决办法]