MySQL can handle the following expression ``` CREATE TABLE t7(a TEXT, UNIQUE (a(1))) ``` With alasql I get ``` Parse error on line 1: ...t7(a TEXT, UNIQUE (a(1))) -----------------------^ Expecting 'EOF', 'WITH', 'COMMA', 'RPAR', 'PIVOT', 'UNPIVOT', 'ORDER', 'EQ', 'WHERE', 'DOT', 'UNION', 'INTERSECT', 'EXCEPT', 'FROM', 'INTO', 'CROSS', 'OUTER', 'NATURAL', 'JOIN', 'INNER', 'LEFT', 'RIGHT', 'FULL', 'SEMI', 'ANTI', 'GROUP', 'LIMIT', 'END', 'ELSE', 'SEMICOLON', 'GO', got 'LPAR' ```
Activity
agershun commentedon Sep 9, 2015
What this construction means? That the first character of a is unique?
mathiasrw commentedon Sep 9, 2015
I will have to replicate it in MySQL - im not sure eighter...
agershun commentedon Jan 11, 2016
@mathiasrw Any news on this?
mathiasrw commentedon Jan 11, 2016
Aw... no news - sorry :-/
Its on my list again now.
mathiasrw commentedon Jan 11, 2016
@agershun
"This is the length option to an index. It uses only the first n characters of a to validate uniqueness."
agershun commentedon Jan 11, 2016
What is better?
UNIQUE(a(1))or for two characters:
2016-01-11 16:26 GMT+03:00 Mathias Rangel Wulff notifications@github.com:
mathiasrw commentedon Jan 11, 2016
I vote for 1) - its part of MySQL so dont see it as a good thing not to support
UNIQUE(a(1))Ps: when making
code styleyou only need a singlearound - the trippelis for when you have a line break :)mathiasrw commentedon Feb 8, 2016
Anything new on this?