sqlite: alias column name can't contains a dot “.”

后端 未结 5 1919
渐次进展
渐次进展 2021-01-01 05:54

(sorry for my poor english)

If you try this select operation over a sqlite database:

SELECT column AS \'alias 1\' FROM table;

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-01 06:19

    Use backticks

    SELECT column AS `alias.1` FROM table;
    

    Or double quotes (ANSI standard) per the other answer

    SELECT column AS "alias.1" FROM table;
    

    Both verified in SQLite Manager for FireFox

提交回复
热议问题