|
Posted by Hugo Kornelis on 08/10/05 12:58
On 9 Aug 2005 19:49:11 -0700, --CELKO-- wrote:
(snip)
> x CHAR(3) DEFAULT ('XXX') NOT NULL
> CHECK (CASE WHEN x LIKE 'AB[0-9]' THEN 'T'
> WHEN x LIKE 'XY[0-9]' THEN 'T'
>\\ ELSE 0 END = 'T'
Hi Joe,
Apart from Steve's comments, I'm also curious why you supply a default
that won't pass the CHECK constraint. If you want an error if no value
is supplied, then why not simply remove the DEFAULT? Gives me an error
message that is much easier to debug!
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
Navigation:
[Reply to this message]
|