The difference between Oracle's getColumnName and getColumnLabel

 

getColumnName returns the original name of the field in the SQL statement. getColumnLabel is the value of the field's SQL AS.

比如:select a.name as name,a.description as description,b.description as relatedDescription from a,b where ...

此时,getColumnName(3) == "description";而getColumnLabel(3) == "relatedDescription"。

 

If you want to map the result of ResultSet to HashMap, be sure to use getColumnLabel instead of getColumnName.

 

Original: http://blog.sina.com.cn/s/blog_735ef3790100qmf3.html

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327106749&siteId=291194637