我想从数据库ID和密码中选择两列 并希望在更新查询中使用这两列数据 示例
select id , pass from table
second update query
update table set password2=password_get_from select_query where id=id_get_from_select_query
答案 0 :(得分:0)
尝试类似的东西。
update table_one as A
inner join table_two AS B on (A.id = B.id)
set A.some_column = B.some_column,
A.another_column = B.another_column
where blah