Click here to Skip to main content
16,022,896 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I run it to the query and successfully created but nothing happen?
can this .sql file can create a database? how?

IM USING MS SQL MNGMT STUDIO
Posted

1 solution

.SQL files are basically queries or sets of queries, so what the exact file you are referring to does is very much dependant on what it contains! It could drop and create tables, insert rows, or delete databases - anything in fact that you can do from the "New query" window in SSMS.

So, use the menu: "File...Open...File"
Browse to the file, and click "Open". A Query window will open which will let you look at the file content, and optionally execute it.
 
Share this answer
 
Comments
Member 10533469 9-Feb-14 2:33am    
i already execute it and it Successfully, and nothing happen?
i want to make it an mdf,
OriginalGriff 9-Feb-14 3:41am    
What does the SQL do? Have you looked inside the file at the SQL commands?
Member 10533469 10-Feb-14 6:34am    
its ok now., i create a new db and executed the .sql file.. work properly as expected
tnx for respone sir :)
OriginalGriff 10-Feb-14 6:44am    
You're welcome!
Member 10533469 10-Feb-14 6:48am    
sir i have another question can you help me???

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900