Last post Jan 08, 2018 10:23 AM by KALYANA ALLAM
Jan 08, 2018 10:00 AM|KALYANA ALLAM|LINK
I have a Table Say A ,it has a Column Loc.
Loc has zeroes and it shouldnt be the case.
Whenever Loc is being Inserted or updated to 0,I want to throw an exception
Check COnstraint could work but I don't want to do data cleanup first,what are other options I could have at Database level.
Jan 08, 2018 10:08 AM|PatriceSc|LINK
Try the NOCHECK option: https://technet.microsoft.com/en-us/library/ms179491(v=sql.105).aspx
The check should be done on newly inserted/.updated rows but verification of existing rows should be skipped...
Jan 08, 2018 10:23 AM|KALYANA ALLAM|LINK
Thanks much Patrice that helps.