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
6.96k stars 651 forks source link

'total' appears to have become a keyword but is not documented as such #1911

Closed report-zone closed 2 months ago

report-zone commented 2 months ago

I have a table which contains total as a column name, this seems to cause all kinds of problems.

I can retrieve it by escaping

select `total' from bills

however I cannot use SUM anymore

select SUM(total) from bills

or

select SUM(total) from bills

both throw and error

report-zone commented 2 months ago

This was caused by a poor query. Not an actual problem.