Just for the record (and a few years late) you can always capture the code that Management Studio runs by performing a Profiler trace. Sure, you have to execute the code to do this but it's really handy to do to see how SQL Server Management Studio does things.
Profiler is installed in all editions (including Express) and is a good tool to get familiar with.