我有一個表:刪除一行在MySQL
NACHRICHT_ID | VERFASSER_USERNAME | BETREFF | TEXT | DATUM | EMPAENGER_ID ------------------------------------------------------------------------------ | | | | 2009-07-01| 1 | h | hfgh | hfgh | 23:15:10 | 31 ------------------------------------------------------------------------------ | | | | 2009-07-02| 3 | h | hfgh | hfgh | 00:30:10 | 31 ------------------------------------------------------------------------------ | | | | 2009-07-02| 4 | q | hfgh | hi | 11:42:06 | 31 ------------------------------------------------------------------------------ | | | | 2009-07-02| 5 | h | hfgh | hfgh | 12:53:56 | 31 ------------------------------------------------------------------------------ | | | | 2009-07-02| 6 | h | hfgh | hfgh | 13:19:53 | 31 ------------------------------------------------------------------------------ | | | | 2009-07-02| 7 | h | hfgh | hfgh | 13:20:18 | 31 ------------------------------------------------------------------------------ | | | | 2009-07-02| 8 | mkd | hfgh | hfgh | 13:47:32 | 31 ------------------------------------------------------------------------------ | | | | 2009-07-02| 9 | h | hfgh | hfgh | 16:42:10 | 31 ------------------------------------------------------------------------------
我試圖刪除的行那裏NACHRICHT_ID = 3
:
DELETE FROM NACHRICHTEN JOIN
NACHRICHTEN_EMPFAENGER_MAP USING (NACHRICHT_ID)
WHERE EMPFAENGER_ID = 31 && NACHRICHT_ID = 3 ;
但它無法正常工作。我究竟做錯了什麼?
@darkrain - 請解釋當你說「刪除會在聯接後發生」時你的意思。它一點都不清楚。 – 2009-07-05 20:31:12
您可能試圖刪除發送給特定收件人的所有新聞項目嗎? – feihtthief 2009-07-05 21:35:24