Forum Moderators: open
SQL query:
--
-- Table structure for table `adv`
--
CREATE TABLE `adv` (
`adv_id` bigint( 20 ) NOT NULL AUTO_INCREMENT ,
`adv_name` varchar( 255 ) NOT NULL default '',
`adv_text` text NOT NULL ,
`adv_status` enum( 'Active', 'Inactive' ) NOT NULL default 'Active',
PRIMARY KEY ( `adv_id` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =9;
MySQL said:
#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 'DEFAULT CHARSET=latin1 AUTO_INCREMENT=9' at line 7
CREATE TABLE `adv` (
`adv_id` bigint( 20 ) NOT NULL AUTO_INCREMENT ,
`adv_name` varchar( 255 ) NOT NULL default '',
`adv_text` text NOT NULL ,
`adv_status` enum( 'Active', 'Inactive' ) NOT NULL default 'Active',
PRIMARY KEY ( `adv_id` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =9;
Thanks
Subikar
when i did a "SHOW CREATE TABLE tablename" in mysql 4.1, there was a very slight difference in syntax - not sure if it makes a practical difference, but worth a try:
CREATE TABLE `adv` (
`adv_id` bigint(20) NOT NULL AUTO_INCREMENT,
`adv_name` varchar(255) NOT NULL default '',
`adv_text` text NOT NULL,
`adv_status` enum( 'Active', 'Inactive' ) NOT NULL default 'Active',
PRIMARY KEY ( `adv_id` )
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1