throw error(L.l("expected INTO at `{0}'", tokenName(token)));
if ((token = scanToken()) != IDENTIFIER)
throw error(L.l("expected identifier at `{0}'", tokenName(token)));
Table table = _database.getTable(_lexeme);
if (table == null)
throw error(L.l("unknown table `{0}'", tokenName(token)));
FromItem fromItem = new FromItem(table, table.getName());
FromItem[] fromList = new FromItem[] { fromItem };
ArrayList<Column> columns = new ArrayList<Column>();
if ((token = scanToken()) == '(') {
do {
String columnName = parseIdentifier();
Column column = table.getColumn(columnName);
if (column == null)
throw new SQLException(L.l("`{0}' is not a valid column in {1}",
columnName, table.getName()));
columns.add(column);
} while ((token = scanToken()) == ',');
if (token != ')')
throw error(L.l("expected ')' at `{0}'", tokenName(token)));
token = scanToken();
}
else {
Column []columnArray = table.getColumns();
for (int i = 0; i < columnArray.length; i++)
columns.add(columnArray[i]);
}