Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 257
William Avatar asked Mar 14 '10 22:03

William


1 Answers

You need to remove the =:

ALTER TABLE test_posts ADD sticky boolean NOT NULL default false 
like image 65
Phil Ross Avatar answered Nov 09 '22 23:11

Phil Ross