Subject | Re: [firebird-support] Re: Checking periods don't overlap |
---|---|
Author | Martijn Tonies |
Post date | 2004-06-14T18:36:48Z |
Hi John,
Really, I've been reading your posts but I don't get it - why do
you want to do that?
The thing about constraints is that they ensure that the committed
data is correct.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com
> Didn't know you could do that! But it doesn't help. I tested it withWhat's the bother with ditry reads?
> a simple integer field, that I wanted to be unique (without using a
> unique index!).
>
> ALTER TABLE T ADD CONSTRAINT CHK_T check (not exists (select * from
> T where intfield = new.intfield));
>
> But it only looks in the current transaction, doesn't dirty-read
> like an index does.
>
> So it's no better than using a trigger :(
Really, I've been reading your posts but I don't get it - why do
you want to do that?
The thing about constraints is that they ensure that the committed
data is correct.
With regards,
Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com