Click here to Skip to main content
15,995,419 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hello,

I'm using this SQL :
SQL
ALTER TABLE  `Houses` ADD  `Phase` VARCHAR NOT NULL


And this is the error that comes up :
SQL
#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 'NOT NULL' at line 1


I'm using MySql clint version 5.1.62.

What's the problem? Any ideas?
Posted

1 solution

You need to specify the size:
SQL
ALTER TABLE  `Houses` ADD  `Phase` VARCHAR(100) NOT NULL
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900