0

I created a really small database in MSSQL Server 2005 in order to get the SQL it requires to create it on the fly, but I haven't been able to do so. Basically, I want the script that creates the database exactly as I created it using SQL Server Management Studio (I don't care about the data since the database is empty, I only want the schema). I know there is a way to do it, but I don't remember how.

Any help really appreciated.

Thanks!

1 Answer 1

2

Right Click Database>Script Database As>Create To>Output option of your choice. I believe this is what you are referring to?

2
  • This will give them only the CREATE DATABASE script. It won't script out any of their tables, etc. If you right click on the database and select Tasks > Generate Scripts, this will provide you a wizard that will allow you to script out the database and all its objects.
    – SQL3D
    Dec 16, 2010 at 17:08
  • Ahh did not know that! Guess I should pay a little more attention then.
    – Charles
    Dec 17, 2010 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.