Re: Help me format this statement
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
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=royale@xxxxxxxxxx