create table `message`( `id` smallint(1) NOT NULL auto_increment, `user` varchar(10) NOT NULL, `title` varchar(50) NOT NULL, `content` tinytext NOT NULL, `lastdate` date NOT NULL, PRIMARY KEY ('id') ) ENGING=innoD DEFAULT CHARSET=gbk AUTO_INCREMENT=1; 这样还是不行错误: #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 ''id') ) ENGING=innoD DEFAULT CHARSET=gbk AUTO_INCREMENT=1' at line 7
`id` smallint(1) NOT NULL auto_increment,
`user` varchar(10) NOT NULL,
`title` varchar(50) NOT NULL,
`content` tinytext NOT NULL,
`lastdate` date NOT NULL,
PRIMARY KEY ('id')
) ENGING=innoD DEFAULT CHARSET=gbk AUTO_INCREMENT=1; 这样还是不行错误:
#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 ''id')
) ENGING=innoD DEFAULT CHARSET=gbk AUTO_INCREMENT=1' at line 7
CREATE TABLE `message1` (
`id` smallint( 1 ) NOT NULL AUTO_INCREMENT ,
`user` varchar( 10 ) NOT NULL ,
`title` varchar( 50 ) NOT NULL ,
`content` tinytext NOT NULL ,
`lastdate` date NOT NULL ,
PRIMARY KEY ( `id` )
) ENGINE = innodb DEFAULT CHARSET = gbk AUTO_INCREMENT =1
lz都是拼写错误!
其实可以使用phpmyadmin来管理数据库,然后每次看它生成的sql语句,
这样比较容易而且很容易掌握常用的sql写法!