SELECT gg.itemid,gi.id,gi.courseid, gg.userid, gg.finalgrade
FROM pauls_grade_grades gg, pauls_grade_items gi
WHERE gg.itemid = gi.id AND gg.userid =36 AND gi.courseid = 13
我想爲上面的同一選擇查詢進行更新查詢。使用不同條件的更新
UPDATE pauls_grade_grades
SET pauls_grade_grades.finalgrade = 28
WHERE usermodified IS NULL AND userid = 36 AND
itemid IN (SELECT gi.id
FROM pauls_grade_items gi
WHERE gi.courseid=13)
這是寫一個UPDATE查詢
您的更新查詢是否有效?那麼它的權利.. – 2012-08-10 08:39:51