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
posted on 2022-10-10 12:30  南晓东  阅读(283)  评论(0编辑  收藏  举报