sqlserver使用with创建临时表
WITH temp AS (SELECT account_checking_number FROM dbo.dt_voucher)
SELECT vd.account_checking_number,vd.voucher_number,tm.account_checking_number FROM dbo.dt_voucher_detail AS vd
LEFT JOIN temp AS tm ON vd.account_checking_number=tm.account_checking_number