views:

81

answers:

1

In Visual Studio 2008, I have this database project to manage my SQL Server 2008 database. This has a prebuild and postbuild SQL Script that contains an example like this:

:r .\myfile.sql

What does this mean?

+1  A: 

The keyword missing from your google search was "sqlcmd".

The "r" command is used to include the contents of another SQL file at that location; the parameter passed in is the relative file path of the included file.

See MSDN docs for sqlcmd syntax for more information.

Dave Roberts