I keep finding more gems in this great tool, Query Analyzer. Here are two additional tips:
1. With the default settings, using the Object Browser for scripting creates what is for me a lot of "noise" in the script. For example, scripting a table will give you something like:
CREATE TABLE [Region] (
[RegionID] [int] NOT NULL ,
[RegionDescription] [nchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
CONSTRAINT [PK_Region] PRIMARY KEY NONCLUSTERED
) ON [PRIMARY]
All those brackets and the collation clauses get in the way for me. Fortunately, you can control a lot of this by going to Tools/Options and clicking on the Script tab. I usually pick "None" as Identifier delimeter and check the "Do not script collation clause ...." option. With these two settings changed, I get the following (in my opinion, cleaner) result:
CREATE TABLE Region (
RegionID int NOT NULL ,
RegionDescription nchar (50) NOT NULL ,
CONSTRAINT PK_Region PRIMARY KEY NONCLUSTERED
) ON PRIMARY
2. Got a stored procedure that has lots of parameters that you want to test? Just right-click on it in the Object Browser and select "Open". You get a nice little "Execute Procedure" dialog box that lists all the parameters, shows their datatypes, and allows you to enter parameter values. Then click the "Execute" button to run the stored procedure. Pretty slick!
A very good article, Brian - good on ya for spreading the word about the many features in this great freebee from Microsoft.