我正在尝试从SQL查询的结果集中创建一个表,但是在选择时出现语法错误,并且在那一刻我触犯了
这些是我尝试过的方法
output
我尝试的另一种方法是
let a = {[ ['Status', 'Count'], ['Todo', 1], ['In Progress', 2], ['Done', 3] ]}
Error:
Uncaught SyntaxError: Unexpected token ,
在这里我在结束括号中出现语法错误 那么创建表的方式是什么
答案 0 :(得分:1)
你很近。您可以像这样向子查询添加别名。
SELECT * --you should list the columns here though instead of using *
INTO schedulewidgetfix
FROM
(select * from PRSNLOCPROFMM
where PERSONALLOCATNPROFID in
(select PERSONALLOCATNPROFID from PERSONALLOCATNPROF where PERSONALLOCATNPROFID
not in (select PERSONALLOCATNPROFID from PRSNLOCPROFORGMM))) x
或更干净的方法是完全像这样消除子查询。
SELECT * --you should list the columns here though instead of using *
INTO schedulewidgetfix
FROM PRSNLOCPROFMM
where PERSONALLOCATNPROFID in
(
select PERSONALLOCATNPROFID
from PERSONALLOCATNPROF
where PERSONALLOCATNPROFID not in (select PERSONALLOCATNPROFID from PRSNLOCPROFORGMM)
)