Hi webmasters, `nameid` varchar(255) NOT NULL default '', Actually this is a part of my database which I was creating today. But mysql said there is an error but I can't find it anywhere. Please tell me whats wrong in this command. Also I can't change 'nameid' word. Thanks alot, KJS.
what error did you get? would you mind posting the entire mysql query you ran? usually the error happens on a line before the one that is returned by mysql
what was the error you got from mysql? just a regular syntax error? or was it something else? At first sight there doesn't seem to be anything wrong with it, maybe you can try removing default '' from each line, but i don't think that's causing the error
i've tested it on my server with this code: CREATE TABLE `funny` ( `id` int( 10 ) NOT NULL AUTO_INCREMENT , `name` VARCHAR( 255 ) NOT NULL default '', PRIMARY KEY ( `id` ) ) Code (markup): and all works fine, the table is created without any problem
i created this table, hope it helps: CREATE TABLE `funny` ( `id` int(10) NOT NULL auto_increment, `name` varchar(255) NOT NULL default '', `nameid` varchar(255) NOT NULL default '', `desc` varchar(255) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
in your third reply, the word money appeared right before the sql queries. Is this a typo? or what do you need it for? Also, since mysql said the error started around "CREATE TABLE", would you mind posting the sql query before the CREATE TABLE? Also: you did post a different sql query than the one where an error occured, cause the tablenames don't match