MySQL server version for the right syntax to use near 'DROP TABLE IF EXISTS `award`'
这是导入的sql部分文件dropdatabasecomputer;createdatabasecomputer;usecomputerDROPTABLEIFEXISTS`...
这是导入的sql部分文件
drop database computer;
create database computer;
use computer
DROP TABLE IF EXISTS `award`;
CREATE TABLE `award` (
`award_id` int(10) unsigned NOT NULL auto_increment,
`award_name` varchar(45) NOT NULL default '',
`award_level` varchar(45) NOT NULL default '',
`award_time` varchar(45) NOT NULL default '',
`award_department` varchar(45) NOT NULL default '',
`award_maintainer` varchar(30) NOT NULL default '',
`award_authors` varchar(45) default NULL,
PRIMARY KEY (`award_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
以下是报错的信息
[SQL]
use computer
DROP TABLE IF EXISTS `award`;
[Err] 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 'DROP TABLE IF EXISTS `award`' at line 3 展开
drop database computer;
create database computer;
use computer
DROP TABLE IF EXISTS `award`;
CREATE TABLE `award` (
`award_id` int(10) unsigned NOT NULL auto_increment,
`award_name` varchar(45) NOT NULL default '',
`award_level` varchar(45) NOT NULL default '',
`award_time` varchar(45) NOT NULL default '',
`award_department` varchar(45) NOT NULL default '',
`award_maintainer` varchar(30) NOT NULL default '',
`award_authors` varchar(45) default NULL,
PRIMARY KEY (`award_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
以下是报错的信息
[SQL]
use computer
DROP TABLE IF EXISTS `award`;
[Err] 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 'DROP TABLE IF EXISTS `award`' at line 3 展开
2个回答
展开全部
use computer 后面要加个分号 ;
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2014-01-01
展开全部
不懂,我是英语废
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |