the column Sequence can only contain strings of the four upper case letters A, C, G and T. Is it possible to defne a check constraint on the table to enforce this? Or do I have to use a trigger?
--Thanks for your help,
Depending upon the nature of the data in that column, you can play around with some of the character functions in your check constraint to achieve the result that you want.
For example, if you can assume that that field will only contain upper case letters (A-Z), then you can define a check constraint like the following:
dknight is right. It will check if A, G, T, C exists and will not eliminate others. Moreover, table definition is messy. You should avoid 26 like conditions in a constraint. It is not wrong just messy.
Bookmarks