Altering a table
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


Altering a table Expand / Collapse
Author
Message
Posted 9/3/2009 9:12:10 AM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior 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
Post #16733
Posted 10/29/2009 4:20:28 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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
Post #17196
Posted 10/29/2009 9:41:30 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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...
Post #17198
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 8:46pm

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.188. 10 queries. Compression Disabled.