Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top