- Original Message -
From: <[EMAIL PROTECTED]>
To: "Jim McAtee" <[EMAIL PROTECTED]>
Cc: "MySQL List" <[EMAIL PROTECTED]>
Sent: Thursday, November 18, 2004 8:28 AM
Subject: Re: copy data only from one table to another table
A semi-generic soluti
EMAIL PROTECTED]> wrote on 11/17/2004 08:37:37 PM:
>
> - Original Message -
> From: "Daniel Kasak" <[EMAIL PROTECTED]>
> To: "Chip Wiegand" <[EMAIL PROTECTED]>; "MySQL List"
> <[EMAIL PROTECTED]>
> Sent: Wednes
[snip]
[snip]
INSERT INTO `table2` (`columnnames`)
SELECT `columnnames`
FROM `table1`
If this is valid SQL surely grave accents are not?
[/snip]
Actually? MySQL supports the use of grave accents around table and
column names. I use them here for emphasis. In certain cases, with older
versions of
- Original Message -
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: "Jonathan Mangin" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, November 18, 2004 9:19 AM
Subject: RE: copy data only from one table to another table
[snip]
INSER
[snip]
INSERT INTO `table2` (`columnnames`)
SELECT `columnnames`
FROM `table1`
If this is valid SQL surely grave accents are not?
[/snip]
Actually? MySQL supports the use of grave accents around table and
column names. I use them here for emphasis. In certain cases, with older
versions of MySQL,
- Original Message -
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: "Chip Wiegand" <[EMAIL PROTECTED]>; "MySQL List"
<[EMAIL PROTECTED]>
Sent: Thursday, November 18, 2004 8:10 AM
Subject: RE: copy data only from one table to another table
[
[snip]
How do I copy all data only from one table into another table? Both
tables
are in the same database. I have phpMyAdmin and it suppossedly does
this,
but it is not working, and there are no error messages.
[/snip]
INSERT INTO `table2` (`columnnames`)
SELECT `columnnames`
FROM `table1`
--
On Wed, 17 Nov 2004 18:37:37 -0700, Jim McAtee <[EMAIL PROTECTED]> wrote:
> How would this be done if table_2 already exists? It has an
> auto_increment field as PK and I want to take all the rows from table_1
> and dump them into table_2. The records being copied from table_1 can get
> new prima
- Original Message -
From: "Daniel Kasak" <[EMAIL PROTECTED]>
To: "Chip Wiegand" <[EMAIL PROTECTED]>; "MySQL List"
<[EMAIL PROTECTED]>
Sent: Wednesday, November 17, 2004 5:04 PM
Subject: Re: copy data only from one table to another table
Chip Wiegand wrote:
How do I copy all data only from one table into another table? Both tables
are in the same database. I have phpMyAdmin and it suppossedly does this,
but it is not working, and there are no error messages.
Thanks,
--
Chip
create table table_2
select * from table_1
--
Daniel
10 matches
Mail list logo