JSqlParser
JSqlParser copied to clipboard
net.sf.jsqlparser.JSQLParserException: Encountered unexpected token: "desc" "DESC"
Describe the bug parser error.
To Reproduce Steps to reproduce the behavior:
- Example SQL : select a from b group by c desc;
- Parsing this SQL using JSqlParser with this statements
- Exception : JSQLParserException
Expected behavior parser success.
System
- mysql 5.7
- Java 1.8
- JSqlParser 4.0
I have never seen such a construct. Is group by c desc a shortcut for group by c order by c desc?
This is an old way of writing. This SQL can be run on MySQL.