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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.