(1)union组合结果集
总结:
(2)公用表表达式
WITH result (WorkNo,Name,SignImg) AS ( SELECT WorkNo,Name,SignImg FROM S_A_User INNER JOIN S_A_UserImg ON S_A_User.ID=UserID ) SELECT * FROM result
用法和解释参考:https://www.cnblogs.com/tohen/p/7505608.html
(3)将查询结果存入表中
select
into 后面的表名不用加#号,直接写表名即可
End