Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 16 Sep 2003 @ 18:38:17 GMT


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


Subj:   Re: How to create sys generated keys
 
From:   Figge, Jason

The only system generated keys I am aware of in Teradata are the Identity columns. They are only available in V2R5 and an example is given below (extracted from the V2R5 manual: Teradata SQL Reference 4 - Data Definition Statements.pdf). Pleas be sure to check the manual, as there are many variations in the use of Identity columns. If you're on V2R4 then you are stuck will having to use an Inmod/Outmod with an ETL operation. Not sure about the accepted methodolody, but this is how we would do it.

CREATE MULTISET TABLE test01
(
        a1 INTEGER      GENERATED BY DEFAULT AS IDENTITY
                        (START WITH 1
                         INCREMENT BY 20
                         MAXVALUE 1000
                        ),
        a2 INTEGER
);

Jason



     
  <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