db2 相当于 tsql 临时表 [英] db2 equivalent of tsql temp table
本文介绍了db2 相当于 tsql 临时表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在 DB2 中执行以下 TSQL 查询?我在根据查询结果创建临时表时遇到问题.
How would I do the following TSQL query in DB2? I'm having problems creating a temp table based on the results from a query.
SELECT
COLUMN_1, COLUMN_2, COLUMN_3
INTO #TEMP_A
FROM TABLE_A
WHERE COLUMN_1 = 1 AND COLUMN_2 = 2
错误信息是:
错误:SQL0104N 在"之后发现了意外的标记#TEMP_A".预期的标记可能包括::".SQLSTATE=42601"
"Error: SQL0104N An unexpected token "#TEMP_A" was found following "". Expected tokens may include: ":". SQLSTATE=42601"
推荐答案
事实证明,我没有创建临时表的权限.
As it turned out, I did not have permissions to create temp tables.
这篇关于db2 相当于 tsql 临时表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文