Assignment: Create, maintain and query an Oracle table
You need to create a table and do the maintainance and querying using that table.
You need to show me the results of creating the table, maintaining and querying it. I need to see the SQL command
you used and the results that it produced.
Note: When I say single row function, I mean functions that return specific rows/records. When I say group
functions, I mean functions that return information from one or more records as one. For example an average would
use a group of records and determine the average.
- Create an Oracle table with an minimum a varchar2 field, a char field, a number field with decimal places,
a number field without decimal places and a date field. You should include a name field where the name is entered
in the format last name slash first name middle name or initial if any. For example:
- Doe/John
- Smith/Mary S
- Adams-Costa/Susan Ann
- Langley/M Richard
- Show me a description of the table.
- Put several records into the table (populate the table). You should then display all of the information in the
table.
- Change a record on the table.
- Delete a record from the table.
- Alter the structure of the table by adding a field. Put information into the field for each record.
- Alter the structure of the table by adding characters to the varchar2 field.
- Do a query that involves a conditionA and conditionB.
- Do a query that involves a conditionA or conditionB.
- Do a query that involves a conditionA AND either conditionB OR conditionC structure.
- Do a query that requires that either conditionA and conditionB are both true or that conditionC is true.
- Do a query that uses a single row function to do character manipulation.
- Do a query that uses a single row date function.
- Do a query that uses a single row numeric function
- Do a query that involves a function within a function (nested functions).
- Do a query that involves formatting numeric results.
- Do a query that does a sort.
- Do a query using single row functions that flip the name so that it reads first middle(if any) last instead
of last, first middle
- Doe/John should be flipped to be John Doe
- Smith/Mary S should be flipped to be Mary S Smith
- Adams-Costa/Susan Ann should be fliiped to be Susan Ann Adams-Costa
- Langley/M Richard should be flipped to be M Richard Langley