CREATE DATABASE test;
use test;
CREATE TABLE student (
id int,
name varchar(255),
address varchar(255),
city varchar(255)
);
CREATE TABLE very_goods (
id int(11) PRIMARY KEY AUTO_INCREMENT COMMENT '商品编号',
type varchar(30) NOT NULL COMMENT '商品类别',
name varchar(30) unique COMMENT '商品名称',
price decimal(7,2) COMMENT '商品价格',
num int(11) default 0 COMMENT '商品库存',
add_time datetime COMMENT '添加时间'
);
INSERT INTO student VALUES (1, '刘一', '郑十家隔壁', '河南');
INSERT INTO student VALUES (2, '陈二', '李四家隔壁', '安徽');
INSERT INTO student VALUES (3, '张三', '白娘子家隔壁', '杭州');
INSERT INTO student VALUES (4, '李四', '许仙家隔壁', '杭州');
INSERT INTO student VALUES (5, '王五', '李四家隔壁', '杭州');
INSERT INTO student VALUES (6, '赵六', '赵六家隔壁', '杭州');
INSERT INTO student VALUES (7, '孙七', '张三家隔壁', '杭州');
INSERT INTO student VALUES (8, '周八', '雷峰塔附近', '杭州');
INSERT INTO student VALUES (9, '吴九', '孙七家隔壁', '杭州');
INSERT INTO student VALUES (10, '郑十', '周八家隔壁', '杭州');
SELECT * FROM student WHERE name = '张三' or name = '赵六' ;
SELECT * FROM very_goods;