Thread: Select into

Select into

From
beyaRecords - The home Urban music
Date:
Hi,
I want to copy a sequence of rows from one table into another table. I 
have tried select into but this will only work if the table you are 
copying to does not already exist. How do I copy to a table that does 
already exist?

regards

Uzo



Re: Select into

From
Richard Huxton
Date:
On Monday 12 January 2004 01:09, beyaRecords - The home Urban music wrote:
> Hi,
> I want to copy a sequence of rows from one table into another table. I
> have tried select into but this will only work if the table you are
> copying to does not already exist. How do I copy to a table that does
> already exist?

Something like:

INSERT INTO table_a (a,b,c)
SELECT d,e,f FROM table_b WHERE f=1;

You could replace any of the columns in the SELECT by an expression if you 
wanted to.

--  Richard Huxton Archonet Ltd