December 2010
Intermediate to advanced
451 pages
11h 16m
English
You want to write a Java class that will query the database and return a result.
Create a Java class that uses the Java Database Connectivity (JDBC) API to query the Oracle Database. For example, the Java class in the following example will query the EMPLOYEES table for all employees who belong to the IT department. The example entails a complete Java class that is named Employees. This class contains a method named getItEmps() that will become a Java stored procedure. The Employees class shown here will be stored into a file named Employees.java.
import java.sql.*;
import oracle.jdbc.*;
public class Employees {
public static void getItEmps(){
String firstName = null; String ...Read now
Unlock full access