|
|
|
Junior Member
      
Group: Forum Members
Last Login: 10/27/2009 10:22:36 AM
Posts: 17,
Visits: 18
|
|
Hello,
Can I add a key and partitions to a table by using the Alter statement, or are these best handled by creating a new table with the keys and partitions defined and then inserting the old table data into the new? The table is very, very large.
Thanks!
Paul
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 11/9/2009 11:31:45 PM
Posts: 1,
Visits: 20
|
|
In Teradata ALTER Table will use to add COLUMN,PRIMARY KEY,CONSTRAINT and for DROP COLUMN,CONSTRAINT.
But if you try to add primary key constraint on existing Table,Teradata will create Unique Secondary Index(USI).
If you selectec the column which is already UPI(Unique Primary Index).
If you still need then you have to recreate the table without mention PI.
Teradata will create Primary Key Column as Primary Index column.
Thanks
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 10/30/2009 4:47:05 AM
Posts: 2,
Visits: 3
|
|
|
I think using Alter statement is the best way to do this task...
|
|
|
|