AlaSQL / alasql

AlaSQL.js - JavaScript SQL database for browser and Node.js. Handles both traditional relational tables and nested JSON data (NoSQL). Export, store, and import data from localStorage, IndexedDB, or Excel.
http://alasql.org
MIT License
7.04k stars 659 forks source link

can not create table with columnName 'value' or 'order' #605

Closed atiertant closed 8 years ago

atiertant commented 8 years ago
alasql('CREATE TABLE IF NOT EXISTS Database.table (value string, order int)');

return error:

Parse error on line 1:↵...XISTS Database.table (valu…ecting 'LITERAL', 'BRALITERAL', 'AS', got 'VALUE'

is there a way to do it?

agershun commented 8 years ago

Please, use square brackets:

alasql('CREATE TABLE IF NOT EXISTS Database.table ([value] string, [order] int)');
atiertant commented 8 years ago

thanks for your help !