Home » SQL & PL/SQL » SQL & PL/SQL » can i add a new column in the middle of a table
can i add a new column in the middle of a table [message #358006] Fri, 07 November 2008 13:01 Go to next message
ramachandra_oracle
Messages: 1
Registered: August 2008
Location: bangalore
Junior Member
hi....
I want to know that can i add a new column in between a tables existing columns.
Re: can i add a new column in the middle of a table [message #358008 is a reply to message #358006] Fri, 07 November 2008 13:13 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
You don't and there is no reason to. This questions is asked way too often, was asked just a few days ago (probably by someone else in your class), yet not one single one of them had ever said why they want to do it. "Because the teacher said so" is not a valid response.

The concept of a Relational Database can be found the the Database Concepts Guide.

[Updated on: Mon, 10 November 2008 08:30]

Report message to a moderator

Re: can i add a new column in the middle of a table [message #358042 is a reply to message #358006] Fri, 07 November 2008 21:14 Go to previous messageGo to next message
fairgame
Messages: 29
Registered: October 2008
Junior Member
Do you want to add columns in existing table??

If so,Do this

alter table
   table_name
add
   (
   column1_name column1_datatype column1_constraint,  
   column2_name column2_datatype column2_constraint,
   column3_name column3_datatype column3_constraint
   );

Re: can i add a new column in the middle of a table [message #358047 is a reply to message #358042] Fri, 07 November 2008 23:35 Go to previous message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
fairgame wrote on Fri, 07 November 2008 22:14
Do you want to add columns in existing table??

If so,Do this

alter table
   table_name
add
   (
   column1_name column1_datatype column1_constraint,  
   column2_name column2_datatype column2_constraint,
   column3_name column3_datatype column3_constraint
   );



This won't help the OP. The OP wanted to "add a new column in between a tables existing columns".
Previous Topic: select , into
Next Topic: Dynamic Join
Goto Forum:
  


Current Time: Mon Feb 17 17:21:08 CST 2025