parent
98b1ca8f7a
commit
718e801639
@ -0,0 +1,35 @@
|
||||
-- 查询所有客户信息
|
||||
SELECT * FROM customers;
|
||||
|
||||
-- 查询电话号码中包含11的所有客户
|
||||
SELECT * FROM customers WHERE T_phone LIKE '%11%';
|
||||
-- 查询所有菜单项信息
|
||||
SELECT * FROM menu_items;
|
||||
|
||||
-- 查询价格在10到20之间的所有菜单项
|
||||
SELECT * FROM menu_items WHERE M_price BETWEEN 10 AND 20;
|
||||
-- 查询所有折扣规则信息
|
||||
SELECT * FROM discount_rules;
|
||||
|
||||
-- 查询折扣大于0.8的所有折扣规则
|
||||
SELECT * FROM discount_rules WHERE discount > 0.8;
|
||||
-- 查询所有餐桌信息
|
||||
SELECT * FROM tables;
|
||||
|
||||
-- 查询状态为占用的所有餐桌
|
||||
SELECT * FROM tables WHERE Cz_zt = '占用';
|
||||
-- 查询所有员工信息
|
||||
SELECT * FROM workers;
|
||||
|
||||
-- 查询工资大于5000的所有员工
|
||||
SELECT * FROM workers WHERE W_salary > 5000;
|
||||
-- 查询所有订单信息
|
||||
SELECT * FROM orders;
|
||||
|
||||
-- 查询所有服务员为03的订单
|
||||
SELECT * FROM orders WHERE W_id = '03';
|
||||
-- 查询所有账单信息
|
||||
SELECT * FROM bills;
|
||||
|
||||
-- 查询所有金额大于30的账单
|
||||
SELECT * FROM bills WHERE S_price > 30;
|
Loading…
Reference in new issue