Isn't this bad since it will lock the rows you're viewing? I started out with EM, but now I couldn't live without query analyzer.
I think it was a great article for beginners. I also think the EM is a great tool for beginners to start with and Query Analyzer should be tought as the next step up.
Thanks Steve. Great article. I have a question the might be slightly off topic. What would be the best way in sql server 2000 to write a stored proc that takes the row limit as an argument?
CREATE PROCEDURE MyTestProc
Set Rowcount @rowlimit select col1, col2 from myTable where...
Just be careful. There are certain circumstances where Set RowCount is ignored. Also, the RowCount will stay set within your procedure until the procedure either ends or you turnit off (Set ROWCOUNT = 0 turns it off).
If not used carefully, Set RowCount can cause you a lot of problems, and you won't realize it until it's too late.
Personally, I would advocate building the query dynamically and using Exec() or sp_executesql to execute it.