Sql check constraint list of values Learn to code solving problems and writing code with our hands-on SQL course. Other DBMSs (such as SQLite) don’t allow you to add a CHECK CONSTRAINT . check: limits the data values of variables to a specific set, range, or list of values. Is there any kind of check or foreign key constraint I can implement to accomplish this? Or do I need some kind of trigger? Jan 24, 2014 ยท but when I create the constraint using this function: ALTER TABLE MyTable WITH CHECK ADD CONSTRAINT CK_Code CHECK (MyCheck(FID) = 0) I get this error: The ALTER TABLE statement conflicted with the CHECK constraint "CK_Code". For example, the range of values for a salary column can be limited by creating a CHECK constraint that allows for only data that ranges from $15,000 through $100,000. You can do that with a check constraint. conname as constraint_name, ccu. name AS COLUMN_NAME, a. table_name='YOUR_TABLE_NAME' and cols. It also allows you to apply constraints to a whole table, letting you restrict a column’s values based on the values of other columns in the table row. entjsonnqgizsafrqwnhbzwcrxmgkypqfpxoejpvyfbmjaswaabhbhcqydlaenkycqcjzviumgw