0

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?

1 Answers1

0

Switch the query editor to SQLCMD mode

enter image description here

and run

:r 00_CreateTable.sql
:r 01_InsertTable.sql
:r 02_UpdateTable.sql
:r 03_DropTable.sql
David Browne - Microsoft
  • 80,331
  • 6
  • 39
  • 67