CREATE TABLE IF NOT EXISTS `contracts` (
`contractId` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(32) CHARACTER SET utf8 NOT NULL COMMENT,
`title` varchar(20) CHARACTER SET utf8 NOT NULL,
`contractText` text CHARACTER SET utf8 NOT NULL,
`date` datetime NOT NULL,
`contractState` tinyint(1) NOT NULL COMMENT '1-Nepatvirtinta, 2- patvirtinta, 3- panaikinta, 4- atmesta',
PRIMARY KEY (`contractId`),
UNIQUE KEY `title` (`title`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_lithuanian_ci AUTO_INCREMENT=15 ;
INSERT INTO `contracts` (`contractId`, `username`, `title`, `contractText`, `date`, `contractState`) VALUES
CREATE TABLE IF NOT EXISTS `users` (
`username` varchar(32) CHARACTER SET utf8 NOT NULL,
`password` varchar(32) CHARACTER SET utf8 NOT NULL,
`email` varchar(20) CHARACTER SET utf8 NOT NULL,
`usergroup` tinyint(1) NOT NULL COMMENT,
`name` varchar(32) CHARACTER SET utf8 NOT NULL,
`lastname` varchar(32) CHARACTER SET utf8 NOT NULL,
`state` tinyint(4) NOT NULL COMMENT,
PRIMARY KEY (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_lithuanian_ci;
在 SQL 服务器上运行此查询时,我收到以下错误:
MySQL 说:文档
#1064 - 您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 13 行的 '
title
varchar(20) CHARACTER SET utf8 NOT NULL,contractText
text CHAR'附近使用正确的语法
为什么会出现这种情况?