Hi Frank,

> -----Original Message-----
> From: [EMAIL PROTECTED]
> Sent: Montag, 19. November 2001 11:46
> 
> I defined a check constraint with following DDL-statement
> 
> ALTER TABLE <Table-Name>  ADD CONSTRAINT <Constraint-Name> 
> CHECK <Column-Name> IN ('Y', 'N')
> 
> When I controlled the results of the operation in SQL Studio 
> the constraint was set up under the name which was given in 
> the DDL command (also the predicate and the expression), but 
> the association of the constraint to the referred column was missing.
> 
> Is there something wrong with my DDL?

No, we have a bug in SQL Studio here :

Constraints on one(or more) column(s) can be arbitrarily complex
in general. Therefore they are stored in the system catalog
by their Definitions, as SQL statements.

When displaying a constraint,  SQL Studio tries to find out the columns 
involved by looking at doublequoted substrings of such a definition.
This heuristics works fine when looking at constraints which
are generated by SQL St. itself (because it doublequotes the names (and
the constraints it can generate are much more restricted then the general
case)).

Constraint display will be improved in the next release.

Until then you could put doublequotes around the names
in your DDL to get the constraints displayed properly.
(and keep them as restricted as the constrains SQL St. 
 can generate.)

HTH , regards

Markus 









 
 

Reply via email to