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. 1. 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. 2. Show me a description of the table. 3. 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 o Jones/Mary Adams-Costa/Susan Ann • Langley/M Richard 4. Change two fields on a record and show me the before and after. 5. Make a change that effects more than one record (but not all) 6. Delete a record and show me the before and after 7. Alter the structure of the table by adding a column/field and populating it. Show me the results 8. Alter the structure of the table by adding characters to a varchar2 field. Show me the results. 9. 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. 10. 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. 11. 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. 12. Do a query that uses between and show me the results 13. Do a query that uses the % and the underscore or characters that are missing. 14. Do a query that looks for one thing that has to be true and either of two other things. 15. Do a query that does a calculation for the results where you add two things together and divide by something. 16. Do a query where you test for null or something else. 17. Do a query that uses NOT and explain what you tried to accomplish. 18. Do a query where you convert to upper or lower case to test. 19. Do a query that uses the substr. 20. Do a query that uses the instr function. 21. Show me a list of tables (generated in Oracle) of the tables you have created. 22 Backun one of vour tableac Show me the inctnuction: executed and chour me the lict of tables including the backun

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I answered questions 1-8.
I need help with questions 8-12!

**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.**

1. Create an Oracle table with a minimum of two varchar(2) fields (one should be a person's name), a char field, a numeric field with decimal places, a numeric field for a whole number, and a date field.
2. Show me a description of the table.
3. Populate the table with data; you should put in a variety of data so 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
4. Change two fields on a record and show me the before and after.
5. Make a change that affects more than one record (but not all).
6. Delete a record and show me the before and after.
7. Alter the structure of the table by adding a column/field and populating it. Show me the results.
8. Alter the structure of the table by adding a character to a varchar2 field. Show me the results.
9. 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.
10. 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.
11. Do a query that does a sort on two fields. Tell me which field is the primary sort and which is the secondary sort. Show me the results.
12. Do a query that uses between and show me the results.
13. Do a query that uses a condition for the underscored characters that are missing.
14. Do a query that looks for one thing that has to be true with either of two other things.
15. Do a query that does a calculation for the results where you add two things together and divide by something.
16. Do a query where you test for null or something else.
17. Do a query that uses NOT and explain what you tried to accomplish
Transcribed Image Text:**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.** 1. Create an Oracle table with a minimum of two varchar(2) fields (one should be a person's name), a char field, a numeric field with decimal places, a numeric field for a whole number, and a date field. 2. Show me a description of the table. 3. Populate the table with data; you should put in a variety of data so 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 4. Change two fields on a record and show me the before and after. 5. Make a change that affects more than one record (but not all). 6. Delete a record and show me the before and after. 7. Alter the structure of the table by adding a column/field and populating it. Show me the results. 8. Alter the structure of the table by adding a character to a varchar2 field. Show me the results. 9. 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. 10. 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. 11. Do a query that does a sort on two fields. Tell me which field is the primary sort and which is the secondary sort. Show me the results. 12. Do a query that uses between and show me the results. 13. Do a query that uses a condition for the underscored characters that are missing. 14. Do a query that looks for one thing that has to be true with either of two other things. 15. Do a query that does a calculation for the results where you add two things together and divide by something. 16. Do a query where you test for null or something else. 17. Do a query that uses NOT and explain what you tried to accomplish
Expert Solution
Step 1

ANSWER :

8)

create table toys (  

toy_name varchar2(10), 

weight   number, 

  colour   varchar2(10)

);

Oracle Database has many data types to choose from. Common data types are: 

Number - stores numeric data: prices, weights, distances, etc.

Date - holds date and time information

Varchar2 - use for general purpose text; names, descriptions, etc.

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education