


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















Background: databases
SQL Basics: Structure of a SQL Statement
SQL Basics: Structure of a SQL Statement
SQL Basics: Structure of a SQL Statement
SQL Basics: Structure of a SQL Statement
JDBC Introduction
On-line Resources
Sun’s JDBC Site
JDBC Tutorial
dbc/
List of Available JDBC Drivers
c/drivers/
Seven Basic Steps in
Using JDBC
JDBC: Details of Process
JDBC: Details of Process, cont.
JDBC: Details of Process, cont.
that take a column index or name and
returns the data
Basic JDBC Example, cont. Statement s = C.createStatement(); String sql="select * from pet"; s.execute(sql); ResultSet res=s.getResultSet(); if (res!=null) { while(res.next()){//note MySql start with 1 System.out.println("\n"+res.getString(1)
} Docsity.com
JDBC Basics: Statements
Statement —used for a query that will be executed once.
PreparedStatement —used for a query that will be executed multiple times
CallableStatement —used for a query that executes a stored procedure.