經安全檢測,此網站為安全網站,請放心前往原始網址!

sql - MySQL UPDATE and SELECT from same table in subquery - Stack Overflow

I'm not sure if this is quite what you're trying to do, but maybe I can show you something to put you on the right path. UPDATE some_table ST SET some_col = ( SELECT some_col FROM some_table OT WHERE OT.ID = ST.ID ) WHERE ST.some_col > 2

stackoverflow.com

網址安全性掃描由 google 提供