谁能给看看,哪里出问题了,为什么总是报错:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual tha
corresponds to your MySQL server version for the right syntax to use near '
--创建数据库
CREATE DATABASE IF NOT EXISTS`shopImooc`;
--打开数据库
USE`shopImooc`;
--创建管理员表
DROP TABLE IF EXISTS`imooc_admin`;
CREATE TABLE`imooc_admin`(
`id`tinyint unsigned auto_increment KEY,
`username`varchar(20) not null unique,
`password`char(32) not null,
`email`varchar(50) not null
);
--创建分类表
DROP TABLE IF EXISTS`imooc_cate`;
CREATE TABLE`imooc_cate`(
`id`smallint unsigned auto_increment key,
`cName`varchar(50) unique
);
--创建商品表
DROP TABLE IF EXISTS`imooc_pro`;
CREATE TABLE`imooc_pro`(
`id`int unsigned auto_increment key,
`pName`varchar(50) not null unique,
`pSn`varchar(50) not null,
`pNum`int unsigned default 1,
`mPrice`decimal(10,2) not null,
`iPrice`decimal(10,2) not null,
`pDesc`text,
`pImg`varchar(50) not null,
`pubTime`int unsigned not null,
`isShow`tinyint(1) default 1,
`isHot`tinyint(1) default 0,
`cId`smallint unsigned not null
);
--创建用户表
DROP TABLE IF EXISTS `imooc_user`;
CREATE TABLE `imooc_user`(
`id`int unsigned auto_increment key,
`username`varchar(20) not null unique,
`password`char(32) not null,
`sex`enum("男","女","保密") not null default "保密",
`face`varchar(50) not null,
`regTime`int unsigned not null
);
--创建相册表
DROP TABLE IF EXISTS `imooc_album`;
CREATE TABLE `imooc_album`(
`id`int unsigned auto_increment key,
`pid`int unsigned not null,
`albumPath`varchar(50) not null
);