Gossamer Forum
Home : Products : Others : MySQLMan :

SQL errors

Quote Reply
SQL errors
Trying to add text fields with defined lengths to a table, I get the following:
MySQL said: You have an error in your SQL syntax near '(25) BINARY NULL ,short_office TEXT(3) BINARY NULL ,phone TEXT(15) BINARY NULL ,' at line 1.

Query: CREATE TABLE offices(Office TEXT(25) BINARY NULL ,short_office TEXT(3) BINARY NULL ,phone TEXT(15) BINARY NULL ,fax TEXT(15) BINARY NULL ,server TEXT(30) BINARY NULL , INDEX (Office,short_office,server), UNIQUE (short_office,server))



Quote Reply
Re: SQL errors In reply to
I don't think you can assign a length to TEXT. Try using CHAR instead. You might want to take a look at this link for more help: http://www.mysql.com/.../R/CREATE_TABLE.html