Is there a way to make the name of the database used in a stored procedure a variable. Can I have 1 stored procedure that runs in different databases based upon the name of the database name I pass in as a parameter.
"a USE database statement is not allowed in a procedure, function or trigger." = error from SQL
Why is this different from all of the other step by step guides? Because I make a living as a DBA and not as a writer and I lived through this experience.
Defining the name:
When I talk to people they say different names on this subject stuff l…