I want to add a constraint of not null into an existing column in a table. After doing some operation of merging data. I want to alter the table to add the constraint not null. However, I do want to first verify the existance of the NotNULL constraint otherwise on the subsequesnt of running the script. The file will throw error. So what should be the way.
I want to try something like:
IF NOT EXISTs (Select.. )
BEGIN
ALTER table ....
END