So I have a lot of table create scripts that I need to run on a fresh database. They are all in one folder, and theirs over 250 of them.
Is there a good way to go about doing this using SSMS?
So I have a lot of table create scripts that I need to run on a fresh database. They are all in one folder, and theirs over 250 of them.
Is there a good way to go about doing this using SSMS?
Option 1: USE BATCH FILE
Using Batch file[to run all the scripts in one click] but that cmd implicitly will use sqlcmd.
Option 2: MERGE MULTIPLE SQL FILES INTO A SINGLE SQL FILE AND THEN EXECUTE IN SSMS IN ONE SHOT
Create a simple batch file under the folder(wherein your 250 table creation scripts reside) as follows
type *.sql > allinone.sql
Note: Open txt document and then copy paste the above content and then save it with extension .bat(Ex:merge.bat)
Just double clicking that batch file will give you the single sql file which you can run in SSMS in single go.