Question: Explain in detail each step of the following SQLJ code import java.sql . * ; / * * This is what you have to do

Explain in detail each step of the following SQLJ code
import java.sql.*;
/**
This is what you have to do in SQLJ
**/
public class SimpleDemoSQLJ // line 6
{
//TO DO: make a main that calls this
public Address getEmployeeAddress(int empno)// line 10
throws SQLException
{
Address addr; // line 13
#sql { SELECT office_addr INTO :addr FROM employees
WHERE empnumber = :empno };
return addr;
}
// line 18
public Address updateAddress(Address addr)
throws SQLException
{
#sql addr ={ VALUES(UPDATE_ADDRESS(:addr))}; // line 22
return addr;
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!