Subject Re: Alternative for UNIQUE constraint
Author magic1278
--- In firebird-support@yahoogroups.com, Helen Borrie
<helebor@...> wrote:
> At 05:19 PM 28/03/2009, you wrote:
>
> "Look ups" is a client-side thing. In SQL, you're typically doing
equivalence tests that return true or false (or bad equivalence tests
that return null/unknown).
> -- SNIP --
> 'magic' <> 'magic----'

Ok, I understand now. I've always just compared stuff with the same data
type so that issue never came up. I guess I'm just too used to expecting
type-mismatch errors popping up that I probably wouldn't ever code a
CHAR/VARCHAR comparison.

> It's wrong according to the LangRef, though.
I see now. I just noticed I used domains in my actual code and what I
put up earlier was what I thought was the minimal amount needed to
demonstrate what I wanted to do. Though the REFERENCE ... lines
themselves never caused a problem when I tested my example...
Anyway, I moved them out of the CREATE TABLE statements and put them
into separate ALTER TABLE ... ADD FOREIGN KEY ... statements. That's
what you meant by explicitly and not in the same transaction, right?