小店想把所有茶摆在一个角落。从 products 里选出 name 里有 tea 这几个字母的东西(在哪个位置都行),要 name 和 price 两列。
| id | name | category | price | stock |
|---|---|---|---|---|
| 1 | Milk tea | drink | 12 | 30 |
| 2 | Lemon water | drink | 8 | 50 |
| 3 | Cheesecake | cake | 25 | 6 |
| 4 | Cookie | snack | 5 | 80 |
| 5 | Brownie | cake | 18 | 0 |
| 6 | Iced coffee | drink | 15 | 20 |
| 7 | Chips | snack | 7 | 40 |
| 8 | Fruit tart | cake | 28 | 4 |
| id | name | category | price | stock |
|---|---|---|---|---|
| 1 | Milk tea | drink | 12 | 30 |
| 2 | Lemon water | drink | 8 | 50 |
| 3 | Cheesecake | cake | 25 | 6 |
| 4 | Cookie | snack | 5 | 80 |
| 5 | Brownie | cake | 18 | 0 |
| 6 | Iced coffee | drink | 15 | 20 |
| 7 | Chips | snack | 7 | 40 |
| 8 | Fruit tart | cake | 28 | 4 |
-- 在这里写:用 WHERE name LIKE 留下名字里有 tea 的 SELECT name, price FROM products;
写好了先点「运行」看看结果,没问题再点「提交」。