Add the command "USE [DatabaseName]" at the top of the script, when using the 'Script Object as Alter F12' feature.
Hi,
I really love the feature to just press F12 on SP and SQLPrompt opens a new query window with an alter script. It improves the productivity and it's a way easier then scrolling or filtering in the object explorer or using the tool tip by copy & paste the definition.
Do you know if there is any possibility to add the command "USE [DatabaseName]" at the top of the script. So, in case I need to switch my connection to a different server I don't need to select my database from the available database list drop down in SSMS.
![](https://secure.gravatar.com/avatar/b2cc5872ed4fe47ee9e949463541a080?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
Robert commented
Every time I use "Script Object As ALTER, I think "man, that would be a great thing to have the USE <current database>
GO
statements at the top of the script" -
Robert commented
I agree! I am always adding a USE statement to the top so I can quicky update another database.
-
Garrett Geier commented
This would be an amazing feature. I hope this gets added.