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;
After little R&D at dev.mysql.com/doc and various other sites i found none is using the braces () in add/modify query in mysql queries, however my add query is running fine with the braces. I just curious about those braces and the concept im missing. Not very good with mysql 😉
The difference is you can add more than 1 column using add, so the privilege of braces with/without works in add, but you can just modify a single so the privilege of braces is not provided