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?
Sql-server – How to get a copy of the SQL generated by Management Studio
sql serverssms
Related Question
- Sql-server – Suppress SQL Server Management Studio auto complete
- Sql-server – How to disable SSMS table designer timeout
- Sql-server – SQL Server Management Studio – connection with SQL Server database engine
- SQL Server – How to Install SQL Server Management Studio Locally
- SQL Server – How to Get Physical Disk ID and Drive Letters in SSMS
- Sql-server – Management Studio licensing issues
- SQL Server Management Studio 2014 – Show Same .sql File in Multiple Tab Groups
- SQL Server Triggers – Triggers Lost When Changing Table Property in SSMS
Best Answer
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
ALTER TABLE
scripts without the help of the wizard / graphical designers. They often do things you don't want to do.