miseleigh Posted July 16, 2008 Share Posted July 16, 2008 We're porting over to MySQL from MSSQL, and while trying to create the tables in our new MySQL DB we're getting a syntax error that we can't find. CREATE TABLE `makem`.`Clients` ( `cl_ID` INTEGER UNSIGNED NOT NULL, `cl_username` VARCHAR NOT NULL, `cl_password` VARCHAR NOT NULL, `cl_challenge` TINYINT NOT NULL DEFAULT 0, `cl_answer` VARCHAR DEFAULT NULL, `cl_name` VARCHAR DEFAULT NULL, `cl_contact` VARCHAR DEFAULT NULL, `cl_phone` VARCHAR DEFAULT NULL, `cl_email` VARCHAR DEFAULT NULL ) CHARACTER SET utf8; It says there's a syntax error near 'NOT NULL'. If anyone can spot it, please let me know so I can fix it and make my table. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/115108-create-table-syntax-error/ Share on other sites More sharing options...
fenway Posted July 16, 2008 Share Posted July 16, 2008 I thought you had to specify VARCHAR sizes. Quote Link to comment https://forums.phpfreaks.com/topic/115108-create-table-syntax-error/#findComment-592013 Share on other sites More sharing options...
cooldude832 Posted July 17, 2008 Share Posted July 17, 2008 I believe you can set a standard "default" varchar length and avoid calling it, but yes that is the error Quote Link to comment https://forums.phpfreaks.com/topic/115108-create-table-syntax-error/#findComment-592171 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.