我正在尝试从 select 语句中更新字段。这是我当前的查询
UPDATE phone_cals
SET call_code_id = id, result_code_id = 0, call_subject = title WHERE status = 1
select call_code_id AS id, call_code_title AS title FROM call_codes
我正在尝试设置
phone_calls.call_code_id = call_codes.call_code_id
phone_calls.result_code_id = 0
phone_calls.call_subject = call_codes.call_code_title
WHERE phone_calls.status = 1
是的,我有一个语法错误,但我不知道如何修复它
Summery 我想选择一个随机的 call_codes.call_code_id 并将其分配给 phone_calls.call_code_id