在使用java程序进行数据对比的时候,在sql中
select id as people_id,name,age from a;
使用java程序运行的时候会发现,数据明细显示的是:
id=1 name =linda age=11
实际上想要的结果:
people_id=1 name =linda age=11
导致这种原因可能是因为方法用错了。
如下有两种方法:
1.String getColumnLabel(int column)
Gets the designated column’s suggested title for use in printouts and displays. 获取用于打印输出和显示的指定列的建议标题。
2.String getColumnName(int column)
Get the designated column’s name. 获取指定列的名称。