I need a quick help in understanding the different methods while creating the table and restricting data with in it.
here is the example:
create multiset table abc.xyz
I want to restrict col1 data as either yes or no while data is inserting into the table itself, it should through error if i insert neither yes nor NO.
I am trying with check constarint, where it is for only with in the range .Please let me know if there are any other constraints that I can restrict the field?
You probably tried the very old proprietary syntax: col1 char(3) BETWEEN ... AND ...,
Simply use Standard SQL:
col1 char(3) CHECK(col1 IN ('yes','no')