mysql貌似没法直接使用update table set a=x from select
但是可以使用inner join来实现:
update librarys INNER JOIN (select * from librarys where hallCode=’AHRF’ OR hallCode=’AGZE’) aa set librarys.system_source=3 where aa.id=librarys.id
UPDATE library_borrower_books INNER JOIN library_books ON library_borrower_books.libraryBookId=library_books.id SET library_borrower_books.limit_borrow_days=50 WHERE library_borrower_books.idCard=’510725198802055137’ and library_books.tag=’e00401503a8ef1e5’