店主在给名字是 M 开头的东西做小招牌。从 products 表里选出 name 以字母 M 开头的东西,两列: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 |
SELECT name, price FROM products -- 在这里写:用 LIKE 'M%' 留下 M 开头的 ;
写好了先点「运行」看看结果,没问题再点「提交」。