I\'ve got this t-sql snippet:
DECLARE @db_name varchar(255); SET @db_name = \'MY_DATABASE\'; -- assuming there is database called \'my_database\' USE @db_nam
The way I do this is with an if statement:
if @DBName = 'DB1' else