Re: Create new table and insert other table data
RootChaos RootChaos wrote:
> Ramalingam,
>
> This works great ! If I also want to create a
> field 'id' auto_increment, primary key - but not
> take that from the master table, how would i
> specify the creation then ?
>
>
> Gawie.
Hi,
Really Sorry .
You can specify that in a single step ..
( And 'AS' keyword is optional )
You can add your definitions first and then use SELECT Statement.
If I am adding an AUTO_INCREMENTing field say 'IDA' to those selected fields from 'master'
mysql> CREATE TABLE tbl_200410
(IDA INTEGER AUTO_INCRMENT PRIMARY KEY)
SELECT Field1,Field2,Field4
FROM
master;
Sorry !
Hope this helps ,
Regards,
Ram.
We Learn the Most When we have to Invent
Subject
Written By
Posted
Re: Create new table and insert other table data
August 26, 2004 06:02AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.