Example:
Need to exchange the two order numbers in the table
plan:
Use the same table data as temporary data and interact with the main table.
update
表 as main,
表 as temp
set
main.bill_no = temp.track_bill_no,
main.track_bill_no = temp.bill_no
where main.id = temp.id; (equivalent condition)
Effect:
Just come here first.