I need to create the SQL code that in it's output will return the CREATE TABLE SQL for all tables in current database.
Any suggestions?
In SQL Server Management Studio(SSMS)
Right click on the DB_NAME -> Select Task -> Select Generate Script.
Follow along the presented wizard and select all tables in that database to generate the scripts.
Use a Visual Studio SQL Server Database Project as follows:
From the Project Menu, select Import > Database ...
Right click on the project and click publish.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With