Re-Primary Key creation

Database
Visitor

Re-Primary Key creation

Hi ,

My self Pranay,

 

 

i am having one doubt regarding primary key in teradata.

when i want to create primary key to particular column, it is showing error as...

primary key cant be created without NOT NULL.

 

why it happens??

primary key in the sense combination of UNIQUE and NOT NULL. Then without NOT NULL y cant we create a primary key....

 

can anyone please help me out this problem.

2 REPLIES
rjg
Supporter

Re: Re-Primary Key creation

Pranay,

A primary key cannot contain nulls.

The absence of "Not Null" in the definition would indicate null was allowed.

 

Does this help?

 

Rglass

Junior Contributor

Re: Re-Primary Key creation

Of course PRIMARY KEY implicitly includes NOT NUL, but you need to add it explicitly, too.

Teradata is not following Standard SQL in this case.