0
我有查詢,如:SQL UPDATE:你不能在FROM子句指定更新目標表 'nilai_mhs'「
UPDATE nilai_mhs
SET status_nilai = 3
where
id_kode_mk =
(SELECT e.id_kode_mk
FROM nilai_mhs c, tbl_mhs d,master_mk e,tbl_mk_pertahun f
WHERE
c.nim = d.nim
AND
c.id_kode_mk = e.id_kode_mk
AND
e.id_kode_mk = f.id_kode_mk
AND
c.nim = '20081001010125'
AND
c.status_nilai =2
AND
sem_ganjil_genap = 'ganjil')
但結果卻顯示錯誤:
能You can't specify target table 'nilai_mhs' for update in FROM clause
人幫助我?
謝謝... 這是工作... – 2011-02-16 08:31:35