I understand that you cannot just abandon the SQL server schema, you must first delete all the objects contained in it. I found this saved proc that performs the task of deleting all the objects, and then the schema itself.
Is there an easier way to abandon the circuit? Ideally, I would like to find a way to do this without using a stored procedure.
Also, it seems that the stored proc will cause errors if the specified schema name does not exist. I would like him to just do nothing. I assume this is just a matter of having this pseudo code at the top of the script
IF @SchemaName NOT EXISTS QUIT
Can someone convert this to a language that SQL Server will understand?
source share