Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 30 Jan 2004 @ 14:09:45 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Constraint Question
 
From:   Vivek Pandey

Hi Mike,

Your question is interesting.

Here is what I believe.

1. CONSTRAINT is w.r.t to a table and not column, although you specify it at column level but at a broader sense a named constraint belongs to the table as a whole.

2. Un-named constriant is w.r.t a column.


You may check it bay the show table command too.

Although I created the table with the syntax you provided. Here is what the show table says and you could easily guess that constraints are treated at table level.

CREATE SET TABLE columnconst ,NO FALLBACK ,
     NO BEFORE JOURNAL,
     NO AFTER JOURNAL
     (
      c29b CHAR(2) CHARACTER SET LATIN NOT CASESPECIFIC CHECK ( (c29b = 'y') OR (c29b =  'n') ) NOT NULL,
      c29a CHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL COMPRESS 'Y',
      c29c CHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL COMPRESS 'x',
      CONSTRAINT MYCONST3 CHECK ( (c29c =  'y') OR  (c29c =  'n') ),
      CONSTRAINT MYCONST2 CHECK ( (c29a =  'y') OR  (c29a =  'n') )) PRIMARY INDEX ( c29b );

  Also notice that I can specify COMPRESS 'x' when my constraint is for 'Y' or 'N'. I would expect an error for this conflict.  


Here I would like to double you & treat this as a bug.


Thanks, Vivek.



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023