I need help writing my PL/SQL code into SQLJ code. I don't understand how SQLJ works, and i'm really struggling with the PL/SQL. Here's what I need to do: 1. Write an SQLJ program that (a) will prompt the user for an old zipcode value and a new zipcode value; and (b) change all occurrences of the old zipcode value in the tables of the mail-order database to the new zipcode value ***My solution in PL/SQL*** ACCEPT oldZip PROMPT 'Enter old zipcode: ' ACCEPT newZip PROMPT 'Enter new zipcode: ' declare aCity [url removed, login to view]%TYPE; begin select CITY into aCity from ZIPCODES where ZIP = &oldZip; insert into ZIPCODES values(&newZip, aCity); update CUSTOMERS set ZIP = &newZip where ZIP = &oldZip; update EMPLOYEES set ZIP = &newZip where ZIP = &oldZip; delete from ZIPCODES where ZIP = &oldZip; end; / 2. For this question, you need to have the ODETAILS table of the mail-order database set up in your hawk Oracle account. Initially, the COST column of the ODETAILS table must be all NULLs. The value of COST of a row of table ODETAILS is the product of the quantity and price of the product ordered. The price of a product is stored in the PRODUCTS table. Assume that you do not have the table PRODUCTS in your account and you must access the PRODUCTS table of my hawk Oracle account Write an SQLJ program that have two database connections to the hawk Oracle database. One is for connecting to your Oracle account and the other for connecting to my Oracle account. Your program uses the connection to my account to access the table PRODUCTS to obtain the needed information to update the COST column of all rows in table ODETAILS. My solution: alter table ODETAILS drop(COST); alter table ODETAILS add(COST number(6,2)); update ODETAILS d set COST = QTY*(select PRICE from PRODUCTS p where [url removed, login to view] = [url removed, login to view]); update ORDERS o set ORDER_COST = (select SUM(COST) from ODETAILS d where [url removed, login to view] = [url removed, login to view]); 3. Write a JDBC program that will compute the total number of rows in all tables in your account. You can obtain all your table names from the system table USER_TABLES. Not sure how to do this one!
Oracle 8i or 9, and Java needs to run to perform the SQLJ operations