Using the Generate Scripts wizard in SQL Server Management Studio 2005 (right click a database -> Tasks -> Generate Scripts…). There is an option for Script Behaviour. The description for the option is as follows:
Script Behaviour
Generate the script as DROP statements, CREATE
statements, or DROP statements
followed by CREATE statements.
However, there are only two options to select from:
- Generate CREATE statements only.
- Generate DROP statements only.
Where is the option to DROP and CREATE? Is there a way to get this behaviour, or have they simply left it out?
In SQL Management Studio (2005 SP3), when i right click on a database -> Tasks -> Generate Scripts, after I select my database and choose Next, the wizard then presents me with a number of script options, with most of them being True/False settings.
To achieve DROP and CREATE I expect you would need to set both the properties below to true.
By default i think Script Create is set to TRUE and Script Drop is set to FALSE.