UPDATE [select * from 长期交易数据库1 where ID in( select top 1 id from 长期交易数据库1 ORDER BY ID DESC)]. AS a, [select * from 短期交易数据库1 where id in (SELECT TOP 1 ID FROM 短期交易数据库1 ORDER BY ID DESC)]. AS b SET a.总额 = a.资金余额+b.资金余额, b.总额 = a.资金余额+b.资金余额;
UPDATE [select * from 长期交易数据库1 where ID in( select top 1 id from 长期交易数据库1 ORDER BY ID DESC)]. AS a, [select * from 短期交易数据库1 where id in (SELECT TOP 1 ID FROM 短期交易数据库1 ORDER BY ID DESC)]. AS b SET a.总额 = a.资金余额+b.资金余额, b.总额 = a.资金余额+b.资金余额;