How to make script to check if exist instead of alter state.
when we compare 2 database and redgate generate syncronize script. Now i want this script to run as many times. means the script must check for the object exist OR not instead of directly alter statement.
By default redgate generate script which run only 1 time. when i try to run script second time then it will display error because of again create statement without drop the procedure.
can anyone please tell me is it possible to generate sql script that check the procedure, function,... exist and if it exist then drop it and recreate it?
Thanks in advance.