Run all SQL files in a directory

Posted by Khalil Dahab on Stack Overflow See other posts from Stack Overflow or by Khalil Dahab
Published on 2010-04-06T08:28:03Z Indexed on 2010/04/06 8:33 UTC
Read the original article Hit count: 365

I have a number of .sql files which I have to run in order to apply changes made by other developers on an SQL Server 2005 database. The files are named according to the following pattern:

0001 - abc.sql
0002 - abcef.sql
0003 - abc.sql
...

Is there a way to run all of them in one go?

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about sql-files