WITH cte
AS ( SELECT id ,
key
FROM result
WHERE label = '姜山'
AND type = 'ROUTE'
UNION ALL
SELECT g.id ,
cte.key
FROM result g
INNER JOIN cte ON g.parentid = cte.id
)
SELECT ccc.result_CODE ,
ccc.result_NAME ,
aaa.*
INTO #temp4
FROM result aaa
INNER JOIN cte bbb ON bbb.id = aaa.id
INNER JOIN main ccc ON aaa.key = ccc.id
WHERE aaa.label LIKE '%资料%';

SqlServer With tableName as怎么转成Oracle sql语句?
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
1条回答 默认 最新
- weixin_42436080 2019-01-04 16:37关注
Oracle INTO关键字只有在存储过程赋值或插入语句用到,所以只需把INTO #temp4去掉即可
解决 无用评论 打赏 举报