PL/SQL IF statements
- Problem #1: Write the PL/SQL code to take in a field, use it in a query and show the results. You should set things up so you read a
file and the variables you define refer to the type in that file. You should take in an id which will allow you to extract 1 records only.
Process it in some way and also use the DBMS to show output.
- Problem #2: Write a PL/SQL simple if...else. Define the variables by giving them types using varchar2 or number. Decide on how you want to process and use the DBMS to show output.
- Problem #3: Write a PL/SQL using an if...elsif. Check for four different options.
- Problem #4: Write the PL/SQL to use a nested IF that meets the criteria of one thing having to be true and either of two other things being true.
- Problem #5: Write the PL/SQL to use a compound IF statement where one thing has to be true and either of two other things has to be true.