Raj More
Raj More

Reputation: 48018

Post build on database project

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?

Upvotes: 2

Views: 667

Answers (1)

Dave Roberts
Dave Roberts

Reputation: 537

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.

Upvotes: 1

Related Questions