What is the best way to handle if USE {invalid_database_name} is failed? I would like to ignore the rest of the statements in such cases. This is so as to avoid accidentally run the script on wrong database.
Thanks for your suggestion !!!
What is the best way to handle if USE {invalid_database_name} is failed? I would
Share
To check if a Database exists :
or if it is a stored procedure :
That’s better that searching in sysobjects.