<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
I'm trying to add range check constraints to tables but I'm not 100%
sure I'm doing it correctly for one of them. Specifically, what do you
do if you want to allow two non-overlapping ranges? For example, I
need to have everything (>105 AND <199) <b>OR</b> (>202 AND
<900). I read in the docs that using 'between' isn't a good idea so
I did something like the following:<br>
<tt><br>
ALTER TABLE gen000<br>
ADD CONSTRAINT check000 CHECK (sample_id > 105 AND sample_id <
199 <b>OR</b> sample_id > 202 AND sample_id < 900);<br>
<br>
</tt>Will this behave the way it reads or do I need to structure it
differently?<br>
<tt><br>
</tt>Thanks,<br>
Bob<br>
<br>
</body>
</html>