I have multiple SQL files under a directory which are having sequence numbering in the filename.
Folder : TableOperation
00_CreateTable.sql
01_InsertTable.sql
02_UpdateTable.sql
03_DropTable.sql
How do we run these SQL files(00_..,01_..,02_..,03_..) at once in SSMS?
CodePudding user response:
Switch the query editor to SQLCMD mode
and run
:r 00_CreateTable.sql
:r 01_InsertTable.sql
:r 02_UpdateTable.sql
:r 03_DropTable.sql