Using a query to split a table in to two.

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
psmshankar
Forum Commoner
Posts: 96
Joined: Tue Aug 06, 2002 4:25 am
Location: India

Using a query to split a table in to two.

Post by psmshankar »

Hi all,
I got a question from my friend whether there is any query/way to
split a table(which has 5 columns) in to two???

He even don't know whether it can be done??
I am not sure whether it can be done or not??

Any idea???

Thanks
Shankar
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

User avatar
mikeq
Forum Regular
Posts: 512
Joined: Fri May 03, 2002 3:33 am
Location: Edinburgh, Scotland

Post by mikeq »

create table MYTABLE as
select this_column, that_column
from myothertable;

This will work.
Post Reply