I'm trying to quickly edit the 10 most recent rows in a large table.
I've been using SQL Server Object Explorer to "Edit all rows" which gives me every row in the table. I scroll to the bottom after it finally displays the results, and I can click on a cell and modify it then and there.
Rather than load the entire table I thought that just getting the 10 latest rows would be quicker. Using DESC alone isn't an option as I need the results ASC while being the most recent 10. A helpful answer in another thread recommended creating a new query with this-
WITH bottom AS (
SELECT TOP (10) *
FROM tbl
ORDER BY n DESC
)
SELECT *
FROM bottom
ORDER BY n
This is awesome, and give me the exact data I want. The only problem is that the cells appear to be read-only. Is there any way of updating these cells without UPDATE statements? Maybe a way to switch to an "Edit" rows mode?
I have a very limited knowledge of SQL, so maybe I'm going about this the wrong way. Any answers or suggestions would be greatly appreciated.
Thanks