更新左连接查询帮助

时间:2011-02-09 18:40:05

标签: mysql

我不知道该怎么做我想做的事 希望在此示例中演示数据关系

UPDATE sym_entries_data_55'
SET value =  '46.00' 
WHERE (sym_entries_data_55.id = sym_entries_data_54.id)
AND (sym_entries_data_54.member_id = sym_entries_data_5.entry_id)
AND (sym_entries_data_5.username = 'namehere')

答案

UPDATE sym_entries_data_55, sym_entries_data_54, sym_entries_data_5
    SET sym_entries_data_55.value = '52.00'
    WHERE sym_entries_data_55.id = sym_entries_data_54.id
        AND sym_entries_data_54.member_id = sym_entries_data_5.entry_id
        AND sym_entries_data_5.username = 'namehere'

1 个答案:

答案 0 :(得分:2)

UPDATE sym_entries_data_55, sym_entries_data_54, sym_entries_data_5
    SET sym_entries_data_55.value = '46.00'
    WHERE sym_entries_data_55.id = sym_entries_data_54.id
        AND sym_entries_data_54.member_id = sym_entries_data_5.entry_id
        AND sym_entries_data_5.username = 'namehere'