mysql记录
批量删除数据库表
Select CONCAT( 'drop table ', table_name, ';' )
FROM information_schema.tables
where table_schema='数据库名称'
/*条件*/
and table_name not in(select Code as table_name from FW_Table)
修改字段值来自另一张表:
update tpb_goods as z left join tpb_allocation_order_goods as zb on z.goods_id = zb.goods_id set z.qty =z.qty- zb.qty where z.goods_id in(SELECT goods_id from tpb_allocation_order_goods);