Reputation: 3057
What I tried so far is to go to server explorer:
and tried to attach a database file but it asks for an .mdf
file and I don't know what is this and how to create it. My database is a .sql
file
Upvotes: 0
Views: 5895
Reputation: 39898
A .sql file, is a file that contains statements that can be executed. They can contain statements that create database and tables (and other stuff) or that manipulate the data in an existing database (like inserting records).
If you want to execute the .sql file, you can open it in Visual Studio and then run it. It will ask you for a connection to a Sql Server instance and then the statements will be executed.
Here is the MSDN documentation that explains this.
Upvotes: 1