Change columns order

Database

Change columns order

How can i change the columns order on a table??

or

How can i insert a new column after other ??

sample

ALTER TABLE <TABLE.NAME> ADD COLUM <NAME.COLUMN> <DATA.TYPE> AFTER <NAME.COLUMN>

hope that i explain well

Tags (1)
2 REPLIES
Senior Apprentice

Re: Change columns order

You can't do that.

Why do you think you need it? Teradata is a Relational database and the order of columns has no relevane in Relational Model.

You might simply change the 1:1 view for this table to use the new order.

Btw, writing "SELECT *" in SQL is bad practice...

Dieter

Re: Change columns order

Thank's for the answer..

I know that Teradata is a relational database and what that means. but, a client ask me about that and i didn't know it, also i couldn't find so much information

again, thank you for take a moment and answer my question

Eduardo.