Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Prepared Statement for select query

843854Jul 9 2004 — edited Nov 20 2014
Hi All,

Can we use PreparedStatement for select query ?

if yes,then how

i mean if i write
PreparedStatement pstmt=con.prepareStatement("select * from Login where empno=? and password=?");

pstmt.setInt(eno);
pstmt.setString(pas);

then how do i see the results of this query?

Pooja
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 6 2008
Added on Jul 9 2004
6 comments
110 views