|
The java.sql package contains classes that help in
connecting to a database.
Important Explanation:
Statement
==This Object allows the execution of simple Queries
PreparedStatement == It allows the execution of
parameterized queries.
setXXX()
==Sets the Value of a PreparedStatment
ResultSet
== It Provides methods to access data from a table.
executeQuery
==This Method executes a simple select query and returns ResultSet
Object
executeUpdata
== This Method executes and SQL Insert, Update and Delete Statements.
Sample Programs for JDBC
Connectivity.
1.Connnecting to Postgres
2.Connnecting to Oracle
|