query " ALTER TABLE test_posts ADD sticky boolean NOT NULL default = false" = error

William picture William · Mar 14, 2010 · Viewed 27.1k times · Source

Whats wrong with my query?

 ALTER TABLE test_posts ADD sticky boolean NOT NULL default = false 

#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 '=false' at line 2

Answer

Phil Ross picture Phil Ross · Mar 14, 2010

You need to remove the =:

ALTER TABLE test_posts ADD sticky boolean NOT NULL default false