Is there a way to make SQL Management Studio never generate USE [database-name] in scripts?

StackOverflow https://stackoverflow.com/questions/158341

  •  03-07-2019
  •  | 
  •  

Question

Is there a way to turn this 'feature' off?

Was it helpful?

Solution

Awesome, I just found it:

Tools -> Options -> Sql Server Object Explorer -> General Scripting Options

Script USE <database> -> False

OTHER TIPS

Tools -> Options -> Sql Server Object Explorer -> Scripting -> Script USE <database> (under the General scripting options heading).

That's in SQL Server 2008 Management Studio, I'm told it's there in 2005, too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top