Brace privilege in ADD and MODIFY in mysql

My Problem

table - tbl_customer 
tool- phpmyadmin

Queries —

ALTER TABLE tbl_customer    <-- All Good
ADD( price int(10) NOT NULL);

While —-

ALTER TABLE tbl_customer   <-- Not Working
MoDIFY( price float(12,2) NOT NULL);

however this works correctly without braces –

ALTER TABLE tbl_customer   <-- All Good
MoDIFY price float(12,2) NOT NULL;


REASON ----------

ADD allows more than 1 column to add but modify allows only single, so braces been provided for add not for modify.
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s