|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I am an idiot. table_a and table_b have exactly the same structure.
How do I say this in SQL: INSERT (all records from table_a) into table_b where table_a.customer = '12' Just trying to eventually duplicate the whole table, one customer's set of records at a time. Thanks. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Wednesday 12 March 2008 00:14:46 Brian Dunning wrote:
> I am an idiot. table_a and table_b have exactly the same structure. > How do I say this in SQL: > > INSERT (all records from table_a) into table_b where table_a.customer > = '12' > > Just trying to eventually duplicate the whole table, one customer's > set of records at a time. Thanks. IIRC ... something like insert into Table_b select table_a where table_a.customer = '12' Check the EXCELLENT docs at ... http://dev.mysql.com/doc/refman/5.1/en/sql-syntax.html .... and refer to the SQL statement syntaxes ... datamanipulation HTH W |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Thanks to everyone who replied. So simple I couldn't see it. :-)
|
|
![]() |
| Outils de la discussion | |
|
|