#1102·alasql

sql exec error

Author: xnetscCreated Apr 23, 2019Updated Sep 10, 2026
LabelsRelated to: SQL complianceBug: Code provided to reproducedGood first issue
var alasql = require("alasql");
alasql("CREATE TABLE tbleName (a INT, b INT,c INT)");
var data = [{
    a: 1,
    b: 1,
    c: 1
}, {
    a: 1,
    b: 2,
    c: 1
}, {
    a: 1,
    b: 3,
    c: 1
}, {
    a: 2,
    b: 1,
    c: 1
}];
var insertedCount = alasql('INSERT INTO tbleName SELECT * FROM ? WHERE a IN(SELECT a FROM tbleName GROUP BY a) GROUP BY a', [data]);

the above would get an error: