create database if NOT EXISTS 'shopImooc';USE 'shopImooc';--gliyaungbiaoDROP 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);--fenleibiaoDROP table IF EXISTS 'imooc_cate';create table 'imooc_cate'('id' smallint unsigned auto_increment key,'cName' varchar(50) unique);--shangpingbiaodrop table if exists 'imooc_por';create table 'imooc_por'('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);--yonghubiaoDROP table if exists 'imooc_user';create table 'imooc_user'('id' int unsigned auto_increment key,'username' varchar(20) not null unique,'password' char(30) not null,'sex' enum("男","女","保密") not null default "保密",'face' varchar(50) not null,'regTime' int unsigned not null);--xiancbiaoDROP 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);
添加回答
举报
0/150
提交
取消