All Forums Database
SanjayPatidar05 2 posts Joined 02/15
13 Feb 2015
Create GENERATED BY DEFAULT AS IDENTITY Column in Teradata

Hi All,

I we are facing issue with below IDENTIFY column when creating mentioned table. 

 

Ex.:-

 

CREATE MULTISET TABLE Auto_Fill_Column (

      a1 INTEGER GENERATED BY DEFAULT AS IDENTITY

         (START WITH 1

          INCREMENT BY 20

          MAXVALUE 1000

         ),

      a2 INTEGER);

 

Error Related to NoPI column in Table

Regard's Patidar Sanjay
dnoeth 4628 posts Joined 11/04
13 Feb 2015

Your system seems to be set to "No Primary Index" as default when no PI is specified in the Create Table.
NoPI tables don't support IDENTITY (don't ask me why).
So add a Primary Index to your definition, either on a1 or on a2, depending on your needs.

Dieter

You must sign in to leave a comment.