I have a table and I need to retrieve the ID of the Second row. How to achieve that ?
By Top 2 I select the two first rows, but I need only
Top 2
In SQL Server 2012+, you can use OFFSET...FETCH:
SELECT FROM ORDER BY OFFSET 1 ROWS -- Skip this number of rows FETCH NEXT 1 ROWS ONLY; -- Return this number of rows 0 讨论(0) 查看其它15个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题