I know this is an old post, but I ran into this problem. Discussed here: http://forums.mysql.com/read.php?39,432843,432862#msg-432862
It is important to note that the poster in the mysql forum states
ResultSetMetaData.getColumnName () will return the actual column name if it exists
This provides a workaround - prevents the use of a column name from an existing one to use an alias. For example, the original planned stored procedure can be modified as
select concat(first name,'') as i_firstname , concat(lastname,'') as i_lastname from roleuser where user_id = uid ;
In this case, the source column is now unknown, and an alias is used. I tested this on my system in a similar situation when I worked. Similarly, if you need to use an alias for int, you can try SELECT (id + 0) AS id_alias. I am sure most column types have similar solutions. Hope this helps.
source share