phpmyadmin query not work for single quote / apostrophe.
Not Work
ALTER TABLE 'about_team' CHANGE 'position' 'pp' INT( 11 ) NOT NULL
Work:
ALTER TABLE `about_team` CHANGE `position` `pp` INT( 11 ) NOT NULL
Same query but not work, gives error:
#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 ”about_team’ CHANGE ‘position’ ‘pp’ INT(11) NOT NULL’ at line 1
it is because when you using
singlequote, it just means it is aSTRING. WhereasBACTICK(the second query) means escaping a column.Actually backticks enclosing the names are optional since the names used where not on
MySQL Reserved Keyword List.Usually,
single quotesare used around values whilebackticksare for table names and column names.