Home  >  Article  >  Database  >  mysql-【菜鸟求助】JSP连接Mysql选取属性大小写的问题

mysql-【菜鸟求助】JSP连接Mysql选取属性大小写的问题

WBOY
WBOYOriginal
2016-06-06 09:35:59857browse

mysqljavajsp

数据库中表单里有属性:NAME、CODE和ID。我在JSP页面中调取属性时写了:
out.print(rst.getString("NAME") + rst.getString("CODE"));
浏览器没有加载出来数据;
将内容改为:
out.print(rst.getString("name") + rst.getString("code"));

浏览器可以加载数据;

但是写在java中,无论是
System.out.print(rst.getString("NAME") + rst.getString("CODE"));
还是
System.out.print(rst.getString("name") + rst.getString("code"));
都可以加载数据,这是什么原因造成的?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn