一般多表update 時候的語句是這樣
update t1,t2 set t1.status=t2.status where t1.id=t2.id
這些可以用做多表數據同步。
但是必須注意,如果t1.id t2.id 不是primary key,update的效率其實很低的
超過一萬條數據不要這樣更新。
一般多表update 時候的語句是這樣
update t1,t2 set t1.status=t2.status where t1.id=t2.id
這些可以用做多表數據同步。
但是必須注意,如果t1.id t2.id 不是primary key,update的效率其實很低的
超過一萬條數據不要這樣更新。