Page 1 of 1
About Question enthuware.ocpjp.v7.2.1365 :
Posted: Sun Jun 16, 2013 3:33 pm
by The_Nick
So basically the WHERE clause is case insensitive an the FROM is case sensitive?
I thought it was case sensitive WHERE that's why I mistook.
Re: About Question enthuware.ocpjp.v7.2.1365 :
Posted: Mon Jun 17, 2013 12:09 pm
by admin
Well, the table name is not important once the query has run (unless you are using the meta data). The question is talks about case insensitivity of the column names because the case is different in the query and the get method.
HTH,
Paul.
Re: About Question enthuware.ocpjp.v7.2.1365 :
Posted: Thu May 15, 2014 5:34 pm
by ewebxml
Code: Select all
ResultSet rs = stmt.executeQuery("select * from CUSTOMER where EMAILID='bob@gmail.com'"); //LINE 10
while(rs.next()){
System.out.println(rs.getString("emailid")); //LINE 12
Question 1: For this question, do we assume that
EMAILID is mapped to ("emailid")?
--------
Question 2: Is EMAILID on line 10
a
1) columnIndex or
2) columnLabel?
-----
The Oracle Docs do not distinguish
http://docs.oracle.com/javase/7/docs/ap ... ltSet.html
between the 2 getString methods.
-----
String getString(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
String getString(String columnLabel)
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.
Re: About Question enthuware.ocpjp.v7.2.1365 :
Posted: Thu May 15, 2014 7:29 pm
by admin
I am not sure why you think EMAILID at line 10 could be a columnIndex or label. It is neither. It is the name of a column.
At line /12, since we are passing a String, it is a columnLabel.
-Paul.
Re: About Question enthuware.ocpjp.v7.2.1365 :
Posted: Mon Apr 27, 2015 7:22 am
by Alina_Lapina
Should we just ignore that the variable 'connection' isn't initialized in the question?
Re: About Question enthuware.ocpjp.v7.2.1365 :
Posted: Mon Apr 27, 2015 7:28 am
by admin
Alina_Lapina wrote:Should we just ignore that the variable 'connection' isn't initialized in the question?
Yes, in the exam also you will find questions where initialization of some variables is not shown. You can safely assume that they are initialized appropriately. If the answer depends on this information, then the question will show it.
Re: About Question enthuware.ocpjp.v7.2.1365 :
Posted: Tue Jan 19, 2016 7:23 am
by toolforger
Where is the spec that says that column names are case insensitive?
Reviewing the pertinent information in the ResultSet JavaDoc says "the name of the column", with no specific information about case sensitivity.
This seems to be a database property; some databases have case-insensitive column names, some have case-sensitive names, for some databases that's even a setting (I think that is the case with MySQL).
What does the Oracle test assume here? Do they have questions that depend on case sensitivity? If yes, do they state sensitivity, do they assume sensitive, do they assume insensitive?
Update: I see it's buried in the ResultSet javadoc, but not on the individual getters.
Nasty.