[TriLUG] MySQL - Alter Table command

Michael Rulison 13miketele at bellsouth.net
Fri Nov 24 14:01:46 EST 2006


I am trying to catenate two columns from b onto c, making sure that the
field 'name' is matched before each record is added with the following sql:

ALTER TABLE cust_extract AS c ADD COLUMN prev_billing_date,
ADD COLUMN next_billing_date FROM billing AS b WHERE c.name = b.name

I get this error message:

#1064 - You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'as c add column prev_billing_date
FROM billing AS b
WHERE c.name = b.name' at line 1

With thanks to those with sharper eyes than mine,

Mike Rulison
------------------------------------------------------------------------
Go to source>>
<http://mysql.meetup.com/144/boards/view/viewthread?thread=2439669>



More information about the TriLUG mailing list