Indexes and constraints:
To do these problems you should set up two simple tables that relate to each other or
you can use existing tables.
- Set up an index on one of the fields on one of your tables.
- Set up an example of each of the constraints discussed in the notes. NOTE: The syntax
to use not null when you alter a table involves using modify.
PL/SQL IF statements
Please use examples that do not look a lot like duplication of what I did!
- Write PL/SQL code to use a simple IF...ELSE.
- Write PL/SQL code to use a nested IF..ELSE. I want nesting on the IF and nesting on the ELSE.
- Write PL/SQL that uses the IF...ELSIF.
PL/SQL Loops
Do not use user input in programs with LOOPS.
- Write PL/SQL that uses the LOOP...END LOOP with an EXIT WHEN embedded in the code.
- Write PL/SQL that uses the WHILE...LOOP.
- Write PL/SQL that uses the FOR LOOP.
Extra Credit: Create a new table to hold the results prior to executing the PL/SQL.
Using PL/SQL write a routine to extract a record from a table, manipulate the data and
place the record in the new table you created.