Hello. Yes, this behavior is correct, ExpressionColumn.getAlias() should return only the name (or possibly alias) of the column for real columns. In recent version of H2 it returns an alias of column if derived column list is used. Plain aliases of columns are represented by Alias class in the same package. It any case name or alias of the table is not included.
tableAlias/columnName combination is used only temporarily for columns that are not yet mapped to a real columns, for constants before their replacement with values, and may be in some other similar situations. There is a ResultSetMetaData.getTableName(int) <https://docs.oracle.com/javase/7/docs/api/java/sql/ResultSetMetaData.html#getTableName(int)> method that can be used to get a real table name from a ResultSet if necessary. When table is joined with itself different aliases for columns should be specified if you need different names for them. Other databases also work in the same way. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
