#1、如果存在某个表就删除
drop table if EXISTS model.`data`;
#2、创建一个表,写出字段、字段的数据类型和表字符集规则
create table model.`data`
(InvoiceNo varchar(20),
StockCode varchar(20),
Description varchar(50),
Quantity int(20),
InvoiceDate varchar(50),
UnitPrice float(20),
CustomerID int(20),
Country varchar(20)) charset=utf8;
#向表里插入值,需要一一对应;
insert into model.`data` VALUES
('536365', '85123A', 'WHITE HANGING HEART T-LIGHT HOLDER', '6', '12/1/2010 8:26', '2.55', '17850', 'United Kingdom'),
('536365', '71053', 'WHITE METAL LANTERN', '6', '12/1/2010 8:26', '3.39', '17850', 'United Kingdom'),
('536365', '84406B', 'CREAM CUPID HEARTS COAT HANGER', '8', '12/1/2010 8:26', '2.75', '17850', 'United Kingdom'),
('536365', '84029G', 'KNITTED UNION FLAG HOT WATER BOTTLE', '6', '12/1/2010 8:26', '3.39', '17850', 'United Kingdom'),
('536365', '84029E', 'RED WOOLLY HOTTIE WHITE HEART.', '6', '12/1/2010 8:26', '3.39', '17850', 'United Kingdom');
#清空表,删除表中所有元素但表还存在
delete from model.`data`
#删除表,表也不存在
drop table model.`data`