Skip to content

Aliases without AS keyword #161

@nijel

Description

@nijel

Having the AS keyword in the select expression is option, following both should work:

SELECT 1 AS name;
SELECT 1 name;

But the shorter variant fails:

$ ./bin/lint-query --query 'SELECT 1 name'
#1: Unrecognized keyword. (near "name" at position 9)

MySQL docs: https://dev.mysql.com/doc/refman/5.7/en/select.html#idm139723195268992

See also phpmyadmin/phpmyadmin#13541

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions