Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Primary key and Primary index on a same column - forum topic by barani_sachin

$
0
0

Hi All,
    While creating a table if i specify both the Primary Index and Primary Key on the same column the table cretion fails.

CREATE TABLE temp4243426
(

name INT NOT NULL,
name2 INT NOT NULL,
PRIMARY KEY (name)
)PRIMARY INDEX(name)

Whereas if we create the table without Primary Key and then alter and add Primary Key it works fine? Any specific reason for this? Wont it create a USI if we alter and add Primay Key later?

Forums: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>