Skip to content

UPDATE with a scalar subquery in SET throws a TypeError #3140

Backlog

Description

@mathiasrw
alasql('CREATE TABLE s (a INT); INSERT INTO s VALUES (1),(2)');
alasql('CREATE TABLE u (x INT); INSERT INTO u VALUES (1),(2)');
alasql('UPDATE s SET a = (SELECT MAX(x) FROM u)');

It throws TypeError: Cannot read properties of undefined (reading '0').

SQLite sets a to 2 in both rows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions