I want to add an IF/DROP Statement similar so the SQL query will run continuously without manual intervention. I need to make sure when I run the query it runs without interference.
Currently I have - which runs fine, but if I want to run it again - it gives me an error: Instance already exists. I want to have a query that checks this instance, drops it if already exists, and creates it.
ALTER TABLE [dbo].[DATABASE]
ADD [GeoLocation] GEOGRAPHY