At 12:53 PM +0800 10/3/01, chong wee siong wrote:
>Hi DBAs:
>   I want to copy TableA in DatabaseA to TableB in DatabaseB
>with changes in the attributes of the tables, what options do I have?
>
>I tried these:
>
>a) insert into TableB (id) select (id) from DatabaseA.TableA;
>this works
>b) insert into TableB (id,data) select (id,data) from DatabaseA.TableA;
>but this does not work, why? and how do I do this?

They syntax is illegal for your second attempt.  The column list for
the SELECT part shouldn't have parentheses around it:


insert into TableB (id,data) select id,data from DatabaseA.TableA;

Parentheses work in your first attempt because (id) is a simple
parenthesized expression that produces id as its value.

-- 
Paul DuBois, [EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to