MySQL缺少关闭括号

时间:2016-01-14 15:40:53

标签: mysql mysql-workbench create-table

我试图用另一个表中的现有数据填充临时表。问题是新表需要一个额外的列调用排名。

CREATE temporary table if not exists TEMP 
AS (select 1 Rang INTEGER AUTO_INCREMENT, 
           ID, 
           Name, 
           Punkte 
    from Highscore 
    ORDER BY Punkte ASC);

但我在'Rang'这个词上出错了。 我正在使用MySQL Workbench。

是允许该语法还是仅仅是一个错误?

1 个答案:

答案 0 :(得分:1)

我想你忘了''在您的查询中:

CREATE temporary table if not exists TEMP AS (select 1, Rang INTEGER AUTO_INCREMENT, ID, Name, Punkte from Highscore ORDER BY Punkte ASC);
相关问题