点击打开所使用到的数据库>>>
1、使用 DDL 创建 easyShopping2 数据库。
create database easyShopping2
2、使用 DDL 更改 easyShopping2 数据库的名字为 easyShopping3。
rename database easyShopping2 to easyShopping3
3、使用 DDL 删除数据库 easyShopping3。
drop database easyShopping3
4、使用 DDL 创建商品表和客户表
商品表:
create table goods( --商品表
goodsID int primary key auto_increment,
goodsCode varchar(20) unique not null,
goodsName varchar(50) not null,
category varchar(20) default null,
unitPrice decimal(8,2) default null,
areaID int default null,
saleCount int default null
);
客户表:
create table customer( --客户表
customerID int primary key auto_increment,
loginID varchar(20) unique not null,
pwd varchar(10) not null,
cName varchar(20) not null,
city varchar(20) default null,
address varchar(50) default null,
phone varchar(20) default null
);