Oracle assignment on creating and maintaining a table (and also a few queries)
For all problems I want you to show me the Oracle command you wrote and the results produced.
- Create an Oracle table with a minimum of two varchar(2) fields (one should be a persons name),
a char field, a numeric field with decimal places, a numeric field for a whole
number and a date field.
- Show me a description of the table.
- Populate the table with data you should put in a variety of data so that
it can be effectively queried.Show me one of the insert statements you used.
The name varchar(2) fields should contain a name
in the format last name slash first name middle name or initial if any. For
example:
- Doe/John M
- Jones/Mary
- Adams-Costa/Susan Ann
- Langley/M Richard
- Change two fields on a record and show me the before and after.
- Make a change that effects more than one record (but not all)
- Delete a record and show me the before and after
- Alter the structure of the table by adding a column/field and populating it. Show me the results
- Alter the structure of the table by adding characters to a varchar2 field. Show me the results.
- Do a search and find out how to alter the structure of the table by deleting a column. Demonstrate
and show me the results. Site the address where you found the explanation.
- Do a search and find out how to alter the structure of the table by renaming a column. Demonstrate
and show me the results. Site the address where you found the explanation.
- Do a query that does a sort on two fields. Tell me which field is the primary sort and which is the
secondary sort. varchar2 field. Show me the results.
- Do a query that uses between and show me the results
- Do a query that uses the % and the underscore or characters that are missing.
- Do a query that looks for one thing that has to be true and either of two other things.
- Do a query that does a calculation for the results where you add two things together and divide by something.
- Do a query where you test for null or something else.
- Do a query that uses NOT and explain what you tried to accomplish.
- Do a query where you convert to upper or lower case to test.
- Do a query that uses the substr.
- Do a query that uses the instr function.
- Show me a list of tables (generated in Oracle) of the tables you have created.
- Backup one of your tables. Show me the instruction you executed and show me the list of tables including the backup.