'How to add new column to select statement with JSqlParser

This is my sql statement.

String sql = "select mydate from mytable";

How can i add new columns to it dynamically with JSqlParser?

For example i want to add "mylocation" column to my sql query:

String sql = "select mydate, mylocation from mytable";


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source