前言:
今天戳代码的时候,发现jdbc中getColumnName方法和getColumnLabel,我以为是一样的,仔细研究之后发现还是不同的
1.getColumnName
getColumnName的解释为:
/**
* Get the designated column's name.
*
* @param column the first column is 1, the second is 2, ...
* @return column name
* @exception SQLException if a database access error occurs
*/
String getColumnName(int column) throws SQLException;
意思是:getColumnName返回的是列名
2.getColumnLabel
getColumnLabel的官方解释为:
/*