If I save a table in Management Studio's Table Designer for example, I believe it runs DDL SQL in the background. Is it possible for me to grab this SQL so that I can save it to a file?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Modern versions of SSMS (2008+ at least) allow you to generate a change script once you have made changes to a table using the graphical designer. You go to the menu item Table Designer > Generate Change Script.
That said, I agree with Thomas. In the long term, you should be proficient at T-SQL so that you can write
You can just go to the table after it is created in SSMS and right click and then select the Script options in the menu.