Re: [SQL] Subselects in CHECK clause ...

2006-11-29 Thread James Robinson
Gotcha. This is indeed to ensure a specialized ref integrity bit, against a column which "ought not ever change". Once some more old code goes away, then can fully normalize this area, making this check subselect bit go away, replaced by a regular FK. Hmm -- probably could even now make it

Re: [SQL] Subselects in CHECK clause ...

2006-11-29 Thread Stephan Szabo
On Wed, 29 Nov 2006, James Robinson wrote: > I see that subselects are not directly supported in check clauses, > but one can work around that by writing a stored function which > returns boolean and performs the subselect. Are there any known > gotchas with doing this? To completely get the con

[SQL] Subselects in CHECK clause ...

2006-11-29 Thread James Robinson
I see that subselects are not directly supported in check clauses, but one can work around that by writing a stored function which returns boolean and performs the subselect. Are there any known gotchas with doing this? The CREATE TABLE docs regarding CHECK clauses states: "Currently, CHE