SQL Server 2005 Query Help -
I have a table and I want to get the line from the previous one. Eg
Keyboard ID keyboard name 1 Choose "keyboard" from the keyboard -> "Dell" 2 "HP" 3 "Vicious" 4 "Samsung"
> More from SELECT *, ROW_NUMBER (), from the RN as ORDER BY KeyboardId DESC) AS WHERE rn = 2; With CTA (Selection *, ROW_NUMBER ()) with
(from RN as the order table by keyboard IDE) SELECT * FROM Cte WHERE rn = 2;
or SELECT TOP (2) * SELECT TOP (2) * TABLE ORDERS BY KEYBOARD IDE DESC) Keyboard ID;
Comments
Post a Comment