我有2個表,我有點糊塗了......MySQL搭配選擇刪除
|products|
________________________
| id | products_name |
|______________________|
| 1 | iphone4 |
| 2 | htc desire |
etc.............
|special_price|
________________________
| id | products_price|
|______________________|
| 1 | 400 |
| 2 | 500 |
etc.............
所有我想要做的是(?):
DELETE (ALL) FROM special_price WHERE products_name='iphone4'
怎麼能這樣呢?
爲什麼你不只是刪除special_price WHERE products_name ='iphone4'? – Li0liQ 2012-01-05 12:05:22
@ Li0liQ:因爲'products_name'位於另一個表中。 – 2012-01-05 12:06:14
@Sergio Tulentsev對不起,我忽視了這一點。 – Li0liQ 2012-01-05 12:07:05