SlideShare a Scribd company logo
Page 5 of 7
Delete this text and type your name here
This file will become rather large due to your screen shots. I
encourage you to compress this file (zip) before submitting it.
Lab 6: 40 Total Points Possible
You will need to log into Apex at https://iacademy.oracle.com"
https://iacademy.oracle.com in order to complete this
assignment.
Sections 7-8--Programming with SQL
Section 7-8 Objectives: Working with DML and DDL
Statements
Creating and Modifying TablesUsing Data Types
Vocabulary:
Directions: Identify the vocabulary word(s) for each definition
below. (1 Point each)
1. Command used to make a new table.
Answer:
2. A collection of objects that are the logical structures that
directly refer to the data in the database. Answer:
3. Specifies a preset value if a value is omitted in the INSERT
statement.
Answer:
4. Stores data; basic unit of storage composed of rows and
columns.
Answer:
5. Created and maintained by the Oracle Server and contains
information about the database.
Answer:
Try It / Solve It:
Log into Apex. Execute the following CREATE TABLE SQL
statement:
CREATE TABLE grad_candidates
(student_id NUMBER(6),
last_name VARCHAR2(15),
first_name VARCHAR2(15),
credits NUMBER (3),
graduation_date DATE);
After executing the above SQL statement, you should receive a
‘Table Created ‘message.
1. Create an SQL statement that will describe the structure of
the table object called grad_candidates. Provide a screen shot of
your table properties as shown below. (2 Points):
Select Statement You Used:
My example of table structure results from Apex (copy): YOU
MUST DELETE MY SCREEN SHOT BELOW AND INSERT
YOUR OWN. YOUR SCREEN SHOW MUST SHOW YOUR
WORSPACE IN ORDER TO RECEIVE CREDIT. (1 Point)
2. Create a new table using a subquery. Name the new table
your last name – e.g., herbert_table. Using a subquery, copy
grad_candidates into herbert_table. Provide a screen shot of the
table structure. (2 Points)
Select Statement You Used:
My example of table structure results from Apex (copy): YOU
MUST DELETE MY SCREEN SHOT BELOW AND INSERT
YOUR OWN. YOUR SCREEN SHOW MUST SHOW YOUR
WORSPACE IN ORDER TO RECEIVE CREDIT. (1 Point)
3. Insert your personal information into the HERBERT_TABLE
(or whatever name you gave it). Hint: DATE and VARCHAR2
data type values need to have an apostrophe surrounding each
value ('). (2 Points)
Select Statement You Used:
My example of table content results from Apex (copy): YOU
MUST DELETE MY SCREEN SHOT BELOW AND INSERT
YOUR OWN. (1 Point)
3. Create an SQL statement using the ALTER TABLE
command. Alter the HERBERT_TABLE (or whatever name you
gave it) and insert a new column called e_mail_address with a
VARCHAR2 data type that will hold 80 characters. (2 Points)
Select Statement You Used:
4. Create an SQL statement that will describe the structure of
the table object you just inserted the e_mail_address column
into. Provide a screen shot of the table structure. (2 Point)
Select Statement You Used:
My example of table structure results from Apex (copy): YOU
MUST DELETE MY SCREEN SHOT BELOW AND INSERT
YOUR OWN. YOUR SCREEN SHOW MUST SHOW YOUR
WORSPACE IN ORDER TO RECEIVE CREDIT. (1 Point)
5. You decide you no longer need the e_mail_address column
after all. Create an SQL statement that will drop this column
from the table. (2 Points)
Select Statement You Used:
6. Create an SQL statement that will describe the structure of
the table object you just altered, removing the e_mail_address
column. Provide a screen shot of the table structure. (2 Points)
Select Statement You Used:
My example of table structure results from Apex (copy): YOU
MUST DELETE MY SCREEN SHOT BELOW AND INSERT
YOUR OWN. YOUR SCREEN SHOW MUST SHOW YOUR
WORSPACE IN ORDER TO RECEIVE CREDIT. (1 Point)
7. Dropping a column from a large table can take a long time.
What is a quicker alternative? (1 Point)
Answer:
8. Create an SQL statement that will modify the name of
HERBERT_TABLE (or whatever name you gave it). Change the
name of the table to PRACTICE_TABLE. Do not copy the table.
(2 Points)
Select Statement You Used:
9. Create an SQL statement that will describe the structure of
the table object PRACTICE_TABLE. Provide a screen shot of
the table structure. (2 Points)
Select Statement You Used:
My example of table structure results from Apex (copy): YOU
MUST DELETE MY SCREEN SHOT BELOW AND INSERT
YOUR OWN. YOUR SCREEN SHOW MUST SHOW YOUR
WORSPACE IN ORDER TO RECEIVE CREDIT. (1 Point)
10. You no longer use the PRACTICE_TABLE and need to
remove it from your schema. Create an SQL statement that will
remove this table. (2 Point)
Select Statement You Used:
11. You just discovered you removed the wrong table! Opppps!
Execute the following SQL statement to see what is in your
recycle bin.
SELECT *
FROM user_recyclebin
My example of table structure results from Apex (copy): YOU
MUST DELETE MY SCREEN SHOT BELOW AND INSERT
YOUR OWN. YOUR SCREEN SHOW MUST SHOW YOUR
WORSPACE IN ORDER TO RECEIVE CREDIT. (1 Point)
12. Your table should be in the recycle bin. Now, create an SQL
statement that recovers that table. (2 Points)
Select Statement You Used:
Execute the following SQL statement to view the
PRACTICE_TABLE contents.
SELECT * from PRACTICE_TABLE
My example of table contents from Apex (copy): YOU MUST
DELETE MY SCREEN SHOT BELOW AND INSERT YOUR
OWN. YOUR SCREEN SHOW MUST SHOW YOUR
WORSPACE IN ORDER TO RECEIVE CREDIT. (1 Point)
13. What is the difference between the TRUNCATE and the
DROP command? (1 Points)
Answer:
14. Create an SQL statement that will add the comment 'This is
a practice table'to the PRACTICE_TABLE. (2 Points)
Select Statement You Used:
Execute the following SQL statement to view all schema table
comments in the data dictionary.
SELECT *
FROM user_tab_comments;
My example of table comments from Apex (copy): YOU MUST
DELETE MY SCREEN SHOT BELOW AND INSERT YOUR
OWN. YOUR SCREEN SHOW MUST SHOW YOUR
WORSPACE IN ORDER TO RECEIVE CREDIT. (1 Point)
:
Page 1 of 12
Delete this text and type your name here
Lab 5: 40 Total Points Possible
You will need to log into Apex at https://iacademy.oracle.com"
https://iacademy.oracle.com in order to complete this
assignment.
Sections 5-7 Programming with SQL
Section 5 Objectives: Using Complex SQL and Aggregate Data
Use GROUP BY and HAVING Clauses
Use Set Operators
Vocabulary:
Directions: Identify the vocabulary word for each definition
below. (1 Point each)
1. Used to specify which groups are to be displayed; restricts
groups that do not meet group criteria.
Answer:
2. Divides the rows in a table into groups.
Answer:
3. Operator that returns all rows from both tables and eliminates
duplicates.
Answer:
Try It / Solve It:
In order to be successful with this lab, you must review the
‘Oracle Student Tables’ file located under ‘Videos and
Resources’ (multiple tabs across bottom of worksheet). This file
will help you to understand the data that is being manipulated in
the SQL statements.
I amproviding a ‘copy’ (first 20 rows) of the ‘Results from
Apex’ for each question.Hopefully, this will help you see if you
are on track with your results. At the top of your SQL window,
you can increase the number of rows displayed. You will
provide the SQL statement you used to produce shown results
AND you will provide a screen shot of your results. In order to
receive points, your screenshot MUST include your workspace
number.
1. Create a query that will return the average of the maximum
employee salaries in each department. You will be gathering
data from the employees table. Execute the query in Oracle
Application Express (Apex). (2 Points)
Select Statement You Used:
My example of correct results from Apex (copy): YOU MUST
DELETE MY SCREEN SHOT BELOW AND INSERT YOUR
OWN. YOUR SCREEN SHOT MUST SHOW YOUR
WORSPACE AND BE CORRECT RESULTS IN ORDER TO
RECEIVE CREDIT.(1 Point)
2. Create a query that will display the employee_id and
department_id from the employees table and a second query
displaying employee_id, job_id, start_date, and department_id
from the job_history table. You will combine the results as one
single output. Make sure you suppress duplicates in the output.
Execute the query in Oracle Application Express (Apex). (2
Points)
Select Statement You Used:
My example of correct results from Apex (copy): YOU MUST
DELETE MY SCREEN SHOT BELOW AND INSERT YOUR
OWN. YOUR SCREEN SHOT MUST SHOW YOUR
WORSPACE AND BE CORRECT RESULTS IN ORDER TO
RECEIVE CREDIT. (1 Point)
3. Create a query that will display an employee's department_id,
manager_id, and job_id as well as the SUM of salaries. You are
gathering data from the employees table. Use Grouping Sets to
show the following groupings: department_id, manager_id,
job_id, manager_id, job_iddepartment_id, manager_id
Execute the query in Oracle Application Express (Apex). (2
Points)
Select StatementYou Used:
My example of correct results from Apex (copy): YOU MUST
DELETE MY SCREEN SHOT BELOW AND INSERT YOUR
OWN. YOUR SCREEN SHOT MUST SHOW YOUR
WORSPACE AND BE CORRECT RESULTS IN ORDER TO
RECEIVE CREDIT. (1 Point)
4. Rewrite the following query using alternate options in the
WHERE clause that will accomplish the same result as shown
below (Hint: Use < comparison operator to specify the track is
any track less than 3). Execute the query in Oracle Application
Express (Apex). (2 Points)
SELECT MAX(song_id)
FROM d_track_listings
WHERE track IN ( 1, 2, 3);
Select Statement You Used:
My example of correct results from Apex (copy): YOU MUST
DELETE MY SCREEN SHOT BELOW AND INSERT YOUR
OWN. YOUR SCREEN SHOT MUST SHOW YOUR
WORSPACE AND BE CORRECT RESULTS IN ORDER TO
RECEIVE CREDIT. (1 Point)
Section 6 Objectives: Creating Subqueries
Create and execute single and multiple row subqueries
Try It / Solve It:
In order to be successful with this lab, you must review the
‘Oracle Student Tables’ file located under ‘Videos and
Resources’ (multiple tabs across bottom of worksheet). This file
will help you to understand the data that is being manipulated in
the SQL statements.
I amproviding a ‘copy’ (first 20 rows) of the ‘Results from
Apex’ for each question. Hopefully, this will help you see if
you are on track with your results. At the top of your SQL
window, you can increase the number of rows displayed. You
will provide the SQL statement you used to produce shown
results AND you will provide a screen shot of your results. In
order to receive points, your screenshot MUST include your
workspace number.
1. Create a query that displays the first_name and last_name for
all employees who have the same department ID as the IT
Department. Use a column alias so that first_name displays as
First Name and last_name displays as Last Name. You will be
gathering data from the employees and departments tables.
Execute the query in Oracle Application Express (Apex). (2
Points)
Select Statement You Used:
My example of correct results from Apex (copy): YOU MUST
DELETE MY SCREEN SHOT BELOW AND INSERT YOUR
OWN. YOUR SCREEN SHOT MUST SHOW YOUR
WORSPACE AND BE CORRECT RESULTS IN ORDER TO
RECEIVE CREDIT. (1 Point)
2. Create a query that displays the first name and last name of
employees who have the same job id as Rajs and was hired after
Davies. Use a column alias so that first_name displays as First
Name and last_name displays as Last Name. You will be
gathering data from the employees table. Execute the query in
Oracle Application Express (Apex). (2 Points)
Select Statement You Used:
My example of correct results from Apex (copy): YOU MUST
DELETE MY SCREEN SHOT BELOW AND INSERT YOUR
OWN. YOUR SCREEN SHOT MUST SHOW YOUR
WORSPACE AND BE CORRECT RESULTS IN ORDER TO
RECEIVE CREDIT. (1 Point)
3. Create a query that will find and display the last names of all
employees whose salaries are the same as the minimum salary
for any department. Use a column alias so that last_name
displays as Last Name. You will be gathering data from the
employees table. Execute the query in Oracle Application
Express (Apex). (2 Points)
Select Statement You Used:
My example of correct results from Apex (copy): YOU MUST
DELETE MY SCREEN SHOT BELOW AND INSERT YOUR
OWN. YOUR SCREEN SHOT MUST SHOW YOUR
WORSPACE AND BE CORRECT RESULTS IN ORDER TO
RECEIVE CREDIT. (1 Point)
Section 7 Objectives: Updating Column Values and Deleting
Rows
Use the INSERT statement
Create and execute an UPDATE and DELETE
statementExplain how foreign-key and primary-key integrity
constraints affect UPDATE and DELETE statements
Vocabulary:
Directions: Identify the vocabulary word for each definition
below. (1 Point each)
1. Modifies existing rows in a table.
Answer:
2. Ensures the data adheres to a predefined set of rules.
Answer:
3. Removes ONE row from a table.
Answer:
Try It / Solve It:
You will need to log into Apex at https://iacademy.oracle.com"
https://iacademy.oracle.com in order to complete this portion of
the assignment.
NOTE: You will need to execute the SQL statement below in
order to copy the ‘customers’ table (f_customers). This will
leave the f_customers table as is, while you modify the copy
(copy_f_customers).
CREATE TABLE copy_f_customers
AS (SELECT * FROM f_customers);
Table copies will not inherit the associated primary-to-foreign-
key integrity rules (relationship constraints) of the original
tables. The column data types, however, are inherited in the
copied tables.
If a change is not possible, give an explanation as to why it is
not possible.
1. Insert the new customers shown below to the
copy_f_customers table. Execute in Oracle Application Express
(Apex). (3 Points)
ID
FIRST_
NAME
LAST_
NAME
ADDRESS
CITY
STATE
ZIP
PHONE_
NUMBER
511
Kathy
Harper
2 Willy Way
Los Angeles
CA
98008
8586667641
225
Daniel
Spode
1923 Silverado
Denver
CO
80219
4258879009
230
Adam
Zurn
5 Admiral Way
Seattle
WA
7193343523
Select Statements You Used:
Using Select * from copy_f_customers, provide a screen shot of
your inserted records.
Why are you not able to insert Adam Zurn?(1 Point)
Your Answer:
My example of correct results from Apex (copy): YOU MUST
DELETE MY SCREEN SHOT BELOW AND INSERT YOUR
OWN. YOUR SCREEN SHOT MUST SHOW YOUR
WORSPACE AND BE CORRECT RESULTS IN ORDER TO
RECEIVE CREDIT. (1 Point)
2. Make a copy of the f_staffs table. Name the copy
copy_f_staffs. Execute: Select * from copy_f_staffs to view
contents of the table. Sue Doe has been an outstanding Global
Foods staff member and has been given a salary raise. She will
now be paid the same as Bob Miller. Update her record in
copy_f_staffs so that she is paid the same salary as Bob Miller.
Execute the query in Oracle Application Express (Apex). (2
Points)
Select Statement You Used:
Using Select * from copy_f_staffs, provide a screen shot of
your updated record.
My example of correct results from Apex (copy): YOU MUST
DELETE MY SCREEN SHOT BELOW AND INSERT YOUR
OWN. YOUR SCREEN SHOT MUST SHOW YOUR
WORSPACE AND BE CORRECT RESULTS IN ORDER TO
RECEIVE CREDIT. (1 Point)
3. Execute the following SQL statement. Explain your results.
Execute the query in Oracle Application Express (Apex). (2
Points)
DELETE from departments
WHERE department_id = 60;
Explain the integrity constraint error
Your Answer:
4. Sue Doe has decided to go back to college and does not have
the time to work and go to school. Delete her from the Global
Fast Foods staff (copy_f_staffs table). Verify that the change
was made. Execute the query in Oracle Application Express
(Apex). (2 Points)
Select Statement You Used:
Using Select * from copy_f_staffs, provide a screen shot of
your table after deleting Sue Doe.
My example of correct results from Apex (copy): YOU MUST
DELETE MY SCREEN SHOT BELOW AND INSERT YOUR
OWN. YOUR SCREEN SHOT MUST SHOW YOUR
WORSPACE AND BE CORRECT RESULTS IN ORDER TO
RECEIVE CREDIT. (1 Point)

More Related Content

Similar to Page 5 of 7Delete this text and type your name hereThis fi.docx

SQL Database Performance Tuning for Developers
SQL Database Performance Tuning for DevelopersSQL Database Performance Tuning for Developers
SQL Database Performance Tuning for Developers
BRIJESH KUMAR
 
Database development coding standards
Database development coding standardsDatabase development coding standards
Database development coding standardsAlessandro Baratella
 
BI Tutorial (Copying Data from Oracle to Microsoft SQLServer)
BI Tutorial (Copying Data from Oracle to Microsoft SQLServer)BI Tutorial (Copying Data from Oracle to Microsoft SQLServer)
BI Tutorial (Copying Data from Oracle to Microsoft SQLServer)
Ifeanyi I Nwodo(De Jeneral)
 
Bis 345-week-4-i lab-new
Bis 345-week-4-i lab-newBis 345-week-4-i lab-new
Bis 345-week-4-i lab-new
assignmentcloud85
 
Database Architecture and Basic Concepts
Database Architecture and Basic ConceptsDatabase Architecture and Basic Concepts
Database Architecture and Basic Concepts
Tony Wong
 
Chapter – 6 SQL Lab Tutorial.pdf
Chapter – 6 SQL Lab Tutorial.pdfChapter – 6 SQL Lab Tutorial.pdf
Chapter – 6 SQL Lab Tutorial.pdf
TamiratDejene1
 
Complex Queries using MYSQL00123211.pptx
Complex Queries using MYSQL00123211.pptxComplex Queries using MYSQL00123211.pptx
Complex Queries using MYSQL00123211.pptx
metriohanzel
 
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment  # 2PreliminariesImportant Points· Evidence of acad.docxAssignment  # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
jane3dyson92312
 
Aggregate Functions,Final
Aggregate Functions,FinalAggregate Functions,Final
Aggregate Functions,Final
mukesh24pandey
 
ECET 450 Laboratory 2Part BPurposeThis laborato.docx
ECET 450 Laboratory 2Part BPurposeThis laborato.docxECET 450 Laboratory 2Part BPurposeThis laborato.docx
ECET 450 Laboratory 2Part BPurposeThis laborato.docx
jack60216
 
Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007paulguerin
 
SQL Query
SQL QuerySQL Query
SQL Query
Imam340267
 
Cis336 week 7 i lab 7
Cis336 week 7 i lab 7Cis336 week 7 i lab 7
Cis336 week 7 i lab 7CIS339
 
SQL (1).pptx
SQL (1).pptxSQL (1).pptx
SQL (1).pptx
AdnanHaque6
 
DashboardUMUC DATA 620Assignment 3.1Your NameProfessorDateProbl.docx
DashboardUMUC DATA 620Assignment 3.1Your NameProfessorDateProbl.docxDashboardUMUC DATA 620Assignment 3.1Your NameProfessorDateProbl.docx
DashboardUMUC DATA 620Assignment 3.1Your NameProfessorDateProbl.docx
simonithomas47935
 
Dbms question
Dbms questionDbms question
Dbms question
Ricky Dky
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
Alex Zaballa
 

Similar to Page 5 of 7Delete this text and type your name hereThis fi.docx (20)

SQL Database Performance Tuning for Developers
SQL Database Performance Tuning for DevelopersSQL Database Performance Tuning for Developers
SQL Database Performance Tuning for Developers
 
Database development coding standards
Database development coding standardsDatabase development coding standards
Database development coding standards
 
BI Tutorial (Copying Data from Oracle to Microsoft SQLServer)
BI Tutorial (Copying Data from Oracle to Microsoft SQLServer)BI Tutorial (Copying Data from Oracle to Microsoft SQLServer)
BI Tutorial (Copying Data from Oracle to Microsoft SQLServer)
 
Bis 345-week-4-i lab-new
Bis 345-week-4-i lab-newBis 345-week-4-i lab-new
Bis 345-week-4-i lab-new
 
Database Architecture and Basic Concepts
Database Architecture and Basic ConceptsDatabase Architecture and Basic Concepts
Database Architecture and Basic Concepts
 
Chapter – 6 SQL Lab Tutorial.pdf
Chapter – 6 SQL Lab Tutorial.pdfChapter – 6 SQL Lab Tutorial.pdf
Chapter – 6 SQL Lab Tutorial.pdf
 
Hira
HiraHira
Hira
 
Complex Queries using MYSQL00123211.pptx
Complex Queries using MYSQL00123211.pptxComplex Queries using MYSQL00123211.pptx
Complex Queries using MYSQL00123211.pptx
 
My sql.ppt
My sql.pptMy sql.ppt
My sql.ppt
 
Sql wksht-2
Sql wksht-2Sql wksht-2
Sql wksht-2
 
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment  # 2PreliminariesImportant Points· Evidence of acad.docxAssignment  # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
 
Aggregate Functions,Final
Aggregate Functions,FinalAggregate Functions,Final
Aggregate Functions,Final
 
ECET 450 Laboratory 2Part BPurposeThis laborato.docx
ECET 450 Laboratory 2Part BPurposeThis laborato.docxECET 450 Laboratory 2Part BPurposeThis laborato.docx
ECET 450 Laboratory 2Part BPurposeThis laborato.docx
 
Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007
 
SQL Query
SQL QuerySQL Query
SQL Query
 
Cis336 week 7 i lab 7
Cis336 week 7 i lab 7Cis336 week 7 i lab 7
Cis336 week 7 i lab 7
 
SQL (1).pptx
SQL (1).pptxSQL (1).pptx
SQL (1).pptx
 
DashboardUMUC DATA 620Assignment 3.1Your NameProfessorDateProbl.docx
DashboardUMUC DATA 620Assignment 3.1Your NameProfessorDateProbl.docxDashboardUMUC DATA 620Assignment 3.1Your NameProfessorDateProbl.docx
DashboardUMUC DATA 620Assignment 3.1Your NameProfessorDateProbl.docx
 
Dbms question
Dbms questionDbms question
Dbms question
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
 

More from alfred4lewis58146

For this assignment, students will need to observe the activities th.docx
For this assignment, students will need to observe the activities th.docxFor this assignment, students will need to observe the activities th.docx
For this assignment, students will need to observe the activities th.docx
alfred4lewis58146
 
For this assignment, select a human service organization from .docx
For this assignment, select a human service organization from .docxFor this assignment, select a human service organization from .docx
For this assignment, select a human service organization from .docx
alfred4lewis58146
 
For this Assignment, read the case study for Claudia and find tw.docx
For this Assignment, read the case study for Claudia and find tw.docxFor this Assignment, read the case study for Claudia and find tw.docx
For this Assignment, read the case study for Claudia and find tw.docx
alfred4lewis58146
 
For this assignment, download the A6 code pack. This zip fil.docx
For this assignment, download the A6 code pack. This zip fil.docxFor this assignment, download the A6 code pack. This zip fil.docx
For this assignment, download the A6 code pack. This zip fil.docx
alfred4lewis58146
 
For this assignment, create infographic using the Canva website..docx
For this assignment, create infographic using the Canva website..docxFor this assignment, create infographic using the Canva website..docx
For this assignment, create infographic using the Canva website..docx
alfred4lewis58146
 
For this assignment, compare  California during the Great Depression.docx
For this assignment, compare  California during the Great Depression.docxFor this assignment, compare  California during the Great Depression.docx
For this assignment, compare  California during the Great Depression.docx
alfred4lewis58146
 
For this assignment, create a 10- to 12-slide presentation in Mi.docx
For this assignment, create a 10- to 12-slide presentation in Mi.docxFor this assignment, create a 10- to 12-slide presentation in Mi.docx
For this assignment, create a 10- to 12-slide presentation in Mi.docx
alfred4lewis58146
 
For this assignment, begin by reading chapters 12-15 in Dr. Bells t.docx
For this assignment, begin by reading chapters 12-15 in Dr. Bells t.docxFor this assignment, begin by reading chapters 12-15 in Dr. Bells t.docx
For this assignment, begin by reading chapters 12-15 in Dr. Bells t.docx
alfred4lewis58146
 
For this assignment, assume you are the new Secretary of Homelan.docx
For this assignment, assume you are the new Secretary of Homelan.docxFor this assignment, assume you are the new Secretary of Homelan.docx
For this assignment, assume you are the new Secretary of Homelan.docx
alfred4lewis58146
 
For this assignment, address the following promptsIntroductor.docx
For this assignment, address the following promptsIntroductor.docxFor this assignment, address the following promptsIntroductor.docx
For this assignment, address the following promptsIntroductor.docx
alfred4lewis58146
 
For this assignment, analyze the play by focusing on one of the .docx
For this assignment, analyze the play by focusing on one of the .docxFor this assignment, analyze the play by focusing on one of the .docx
For this assignment, analyze the play by focusing on one of the .docx
alfred4lewis58146
 
For this assignment I would like you to answer these questions.docx
For this assignment I would like you to answer these questions.docxFor this assignment I would like you to answer these questions.docx
For this assignment I would like you to answer these questions.docx
alfred4lewis58146
 
For the Weekly Reports I need 2 reports. For the First two weeks the.docx
For the Weekly Reports I need 2 reports. For the First two weeks the.docxFor the Weekly Reports I need 2 reports. For the First two weeks the.docx
For the Weekly Reports I need 2 reports. For the First two weeks the.docx
alfred4lewis58146
 
For the shortanswer questions,you will need to respo.docx
For the shortanswer questions,you will need to respo.docxFor the shortanswer questions,you will need to respo.docx
For the shortanswer questions,you will need to respo.docx
alfred4lewis58146
 
For the sake of argument (this essay in particular), lets prete.docx
For the sake of argument (this essay in particular), lets prete.docxFor the sake of argument (this essay in particular), lets prete.docx
For the sake of argument (this essay in particular), lets prete.docx
alfred4lewis58146
 
For the proposal, each student must describe an interface they a.docx
For the proposal, each student must describe an interface they a.docxFor the proposal, each student must describe an interface they a.docx
For the proposal, each student must describe an interface they a.docx
alfred4lewis58146
 
For the project, you will be expected to apply the key concepts of p.docx
For the project, you will be expected to apply the key concepts of p.docxFor the project, you will be expected to apply the key concepts of p.docx
For the project, you will be expected to apply the key concepts of p.docx
alfred4lewis58146
 
For the past several weeks you have addressed several different area.docx
For the past several weeks you have addressed several different area.docxFor the past several weeks you have addressed several different area.docx
For the past several weeks you have addressed several different area.docx
alfred4lewis58146
 
For the Mash it Up assignment, we experimented with different ways t.docx
For the Mash it Up assignment, we experimented with different ways t.docxFor the Mash it Up assignment, we experimented with different ways t.docx
For the Mash it Up assignment, we experimented with different ways t.docx
alfred4lewis58146
 
For the first time in modern history, the world is experiencing a he.docx
For the first time in modern history, the world is experiencing a he.docxFor the first time in modern history, the world is experiencing a he.docx
For the first time in modern history, the world is experiencing a he.docx
alfred4lewis58146
 

More from alfred4lewis58146 (20)

For this assignment, students will need to observe the activities th.docx
For this assignment, students will need to observe the activities th.docxFor this assignment, students will need to observe the activities th.docx
For this assignment, students will need to observe the activities th.docx
 
For this assignment, select a human service organization from .docx
For this assignment, select a human service organization from .docxFor this assignment, select a human service organization from .docx
For this assignment, select a human service organization from .docx
 
For this Assignment, read the case study for Claudia and find tw.docx
For this Assignment, read the case study for Claudia and find tw.docxFor this Assignment, read the case study for Claudia and find tw.docx
For this Assignment, read the case study for Claudia and find tw.docx
 
For this assignment, download the A6 code pack. This zip fil.docx
For this assignment, download the A6 code pack. This zip fil.docxFor this assignment, download the A6 code pack. This zip fil.docx
For this assignment, download the A6 code pack. This zip fil.docx
 
For this assignment, create infographic using the Canva website..docx
For this assignment, create infographic using the Canva website..docxFor this assignment, create infographic using the Canva website..docx
For this assignment, create infographic using the Canva website..docx
 
For this assignment, compare  California during the Great Depression.docx
For this assignment, compare  California during the Great Depression.docxFor this assignment, compare  California during the Great Depression.docx
For this assignment, compare  California during the Great Depression.docx
 
For this assignment, create a 10- to 12-slide presentation in Mi.docx
For this assignment, create a 10- to 12-slide presentation in Mi.docxFor this assignment, create a 10- to 12-slide presentation in Mi.docx
For this assignment, create a 10- to 12-slide presentation in Mi.docx
 
For this assignment, begin by reading chapters 12-15 in Dr. Bells t.docx
For this assignment, begin by reading chapters 12-15 in Dr. Bells t.docxFor this assignment, begin by reading chapters 12-15 in Dr. Bells t.docx
For this assignment, begin by reading chapters 12-15 in Dr. Bells t.docx
 
For this assignment, assume you are the new Secretary of Homelan.docx
For this assignment, assume you are the new Secretary of Homelan.docxFor this assignment, assume you are the new Secretary of Homelan.docx
For this assignment, assume you are the new Secretary of Homelan.docx
 
For this assignment, address the following promptsIntroductor.docx
For this assignment, address the following promptsIntroductor.docxFor this assignment, address the following promptsIntroductor.docx
For this assignment, address the following promptsIntroductor.docx
 
For this assignment, analyze the play by focusing on one of the .docx
For this assignment, analyze the play by focusing on one of the .docxFor this assignment, analyze the play by focusing on one of the .docx
For this assignment, analyze the play by focusing on one of the .docx
 
For this assignment I would like you to answer these questions.docx
For this assignment I would like you to answer these questions.docxFor this assignment I would like you to answer these questions.docx
For this assignment I would like you to answer these questions.docx
 
For the Weekly Reports I need 2 reports. For the First two weeks the.docx
For the Weekly Reports I need 2 reports. For the First two weeks the.docxFor the Weekly Reports I need 2 reports. For the First two weeks the.docx
For the Weekly Reports I need 2 reports. For the First two weeks the.docx
 
For the shortanswer questions,you will need to respo.docx
For the shortanswer questions,you will need to respo.docxFor the shortanswer questions,you will need to respo.docx
For the shortanswer questions,you will need to respo.docx
 
For the sake of argument (this essay in particular), lets prete.docx
For the sake of argument (this essay in particular), lets prete.docxFor the sake of argument (this essay in particular), lets prete.docx
For the sake of argument (this essay in particular), lets prete.docx
 
For the proposal, each student must describe an interface they a.docx
For the proposal, each student must describe an interface they a.docxFor the proposal, each student must describe an interface they a.docx
For the proposal, each student must describe an interface they a.docx
 
For the project, you will be expected to apply the key concepts of p.docx
For the project, you will be expected to apply the key concepts of p.docxFor the project, you will be expected to apply the key concepts of p.docx
For the project, you will be expected to apply the key concepts of p.docx
 
For the past several weeks you have addressed several different area.docx
For the past several weeks you have addressed several different area.docxFor the past several weeks you have addressed several different area.docx
For the past several weeks you have addressed several different area.docx
 
For the Mash it Up assignment, we experimented with different ways t.docx
For the Mash it Up assignment, we experimented with different ways t.docxFor the Mash it Up assignment, we experimented with different ways t.docx
For the Mash it Up assignment, we experimented with different ways t.docx
 
For the first time in modern history, the world is experiencing a he.docx
For the first time in modern history, the world is experiencing a he.docxFor the first time in modern history, the world is experiencing a he.docx
For the first time in modern history, the world is experiencing a he.docx
 

Recently uploaded

Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 

Recently uploaded (20)

Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 

Page 5 of 7Delete this text and type your name hereThis fi.docx

  • 1. Page 5 of 7 Delete this text and type your name here This file will become rather large due to your screen shots. I encourage you to compress this file (zip) before submitting it. Lab 6: 40 Total Points Possible You will need to log into Apex at https://iacademy.oracle.com" https://iacademy.oracle.com in order to complete this assignment. Sections 7-8--Programming with SQL Section 7-8 Objectives: Working with DML and DDL Statements Creating and Modifying TablesUsing Data Types Vocabulary: Directions: Identify the vocabulary word(s) for each definition below. (1 Point each) 1. Command used to make a new table. Answer: 2. A collection of objects that are the logical structures that directly refer to the data in the database. Answer: 3. Specifies a preset value if a value is omitted in the INSERT statement. Answer: 4. Stores data; basic unit of storage composed of rows and columns. Answer: 5. Created and maintained by the Oracle Server and contains information about the database. Answer: Try It / Solve It:
  • 2. Log into Apex. Execute the following CREATE TABLE SQL statement: CREATE TABLE grad_candidates (student_id NUMBER(6), last_name VARCHAR2(15), first_name VARCHAR2(15), credits NUMBER (3), graduation_date DATE); After executing the above SQL statement, you should receive a ‘Table Created ‘message. 1. Create an SQL statement that will describe the structure of the table object called grad_candidates. Provide a screen shot of your table properties as shown below. (2 Points): Select Statement You Used: My example of table structure results from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOW MUST SHOW YOUR WORSPACE IN ORDER TO RECEIVE CREDIT. (1 Point) 2. Create a new table using a subquery. Name the new table your last name – e.g., herbert_table. Using a subquery, copy grad_candidates into herbert_table. Provide a screen shot of the table structure. (2 Points) Select Statement You Used: My example of table structure results from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOW MUST SHOW YOUR WORSPACE IN ORDER TO RECEIVE CREDIT. (1 Point) 3. Insert your personal information into the HERBERT_TABLE (or whatever name you gave it). Hint: DATE and VARCHAR2 data type values need to have an apostrophe surrounding each
  • 3. value ('). (2 Points) Select Statement You Used: My example of table content results from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. (1 Point) 3. Create an SQL statement using the ALTER TABLE command. Alter the HERBERT_TABLE (or whatever name you gave it) and insert a new column called e_mail_address with a VARCHAR2 data type that will hold 80 characters. (2 Points) Select Statement You Used: 4. Create an SQL statement that will describe the structure of the table object you just inserted the e_mail_address column into. Provide a screen shot of the table structure. (2 Point) Select Statement You Used: My example of table structure results from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOW MUST SHOW YOUR WORSPACE IN ORDER TO RECEIVE CREDIT. (1 Point) 5. You decide you no longer need the e_mail_address column after all. Create an SQL statement that will drop this column from the table. (2 Points) Select Statement You Used: 6. Create an SQL statement that will describe the structure of the table object you just altered, removing the e_mail_address column. Provide a screen shot of the table structure. (2 Points) Select Statement You Used:
  • 4. My example of table structure results from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOW MUST SHOW YOUR WORSPACE IN ORDER TO RECEIVE CREDIT. (1 Point) 7. Dropping a column from a large table can take a long time. What is a quicker alternative? (1 Point) Answer: 8. Create an SQL statement that will modify the name of HERBERT_TABLE (or whatever name you gave it). Change the name of the table to PRACTICE_TABLE. Do not copy the table. (2 Points) Select Statement You Used: 9. Create an SQL statement that will describe the structure of the table object PRACTICE_TABLE. Provide a screen shot of the table structure. (2 Points) Select Statement You Used: My example of table structure results from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOW MUST SHOW YOUR WORSPACE IN ORDER TO RECEIVE CREDIT. (1 Point) 10. You no longer use the PRACTICE_TABLE and need to remove it from your schema. Create an SQL statement that will remove this table. (2 Point) Select Statement You Used: 11. You just discovered you removed the wrong table! Opppps! Execute the following SQL statement to see what is in your recycle bin. SELECT *
  • 5. FROM user_recyclebin My example of table structure results from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOW MUST SHOW YOUR WORSPACE IN ORDER TO RECEIVE CREDIT. (1 Point) 12. Your table should be in the recycle bin. Now, create an SQL statement that recovers that table. (2 Points) Select Statement You Used: Execute the following SQL statement to view the PRACTICE_TABLE contents. SELECT * from PRACTICE_TABLE My example of table contents from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOW MUST SHOW YOUR WORSPACE IN ORDER TO RECEIVE CREDIT. (1 Point) 13. What is the difference between the TRUNCATE and the DROP command? (1 Points) Answer: 14. Create an SQL statement that will add the comment 'This is a practice table'to the PRACTICE_TABLE. (2 Points) Select Statement You Used: Execute the following SQL statement to view all schema table comments in the data dictionary. SELECT * FROM user_tab_comments; My example of table comments from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOW MUST SHOW YOUR WORSPACE IN ORDER TO RECEIVE CREDIT. (1 Point) :
  • 6. Page 1 of 12 Delete this text and type your name here Lab 5: 40 Total Points Possible You will need to log into Apex at https://iacademy.oracle.com" https://iacademy.oracle.com in order to complete this assignment. Sections 5-7 Programming with SQL Section 5 Objectives: Using Complex SQL and Aggregate Data Use GROUP BY and HAVING Clauses Use Set Operators Vocabulary: Directions: Identify the vocabulary word for each definition below. (1 Point each) 1. Used to specify which groups are to be displayed; restricts groups that do not meet group criteria. Answer: 2. Divides the rows in a table into groups. Answer: 3. Operator that returns all rows from both tables and eliminates duplicates. Answer: Try It / Solve It: In order to be successful with this lab, you must review the ‘Oracle Student Tables’ file located under ‘Videos and Resources’ (multiple tabs across bottom of worksheet). This file will help you to understand the data that is being manipulated in the SQL statements.
  • 7. I amproviding a ‘copy’ (first 20 rows) of the ‘Results from Apex’ for each question.Hopefully, this will help you see if you are on track with your results. At the top of your SQL window, you can increase the number of rows displayed. You will provide the SQL statement you used to produce shown results AND you will provide a screen shot of your results. In order to receive points, your screenshot MUST include your workspace number. 1. Create a query that will return the average of the maximum employee salaries in each department. You will be gathering data from the employees table. Execute the query in Oracle Application Express (Apex). (2 Points) Select Statement You Used: My example of correct results from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOT MUST SHOW YOUR WORSPACE AND BE CORRECT RESULTS IN ORDER TO RECEIVE CREDIT.(1 Point) 2. Create a query that will display the employee_id and department_id from the employees table and a second query displaying employee_id, job_id, start_date, and department_id
  • 8. from the job_history table. You will combine the results as one single output. Make sure you suppress duplicates in the output. Execute the query in Oracle Application Express (Apex). (2 Points) Select Statement You Used: My example of correct results from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOT MUST SHOW YOUR WORSPACE AND BE CORRECT RESULTS IN ORDER TO RECEIVE CREDIT. (1 Point) 3. Create a query that will display an employee's department_id, manager_id, and job_id as well as the SUM of salaries. You are gathering data from the employees table. Use Grouping Sets to show the following groupings: department_id, manager_id, job_id, manager_id, job_iddepartment_id, manager_id Execute the query in Oracle Application Express (Apex). (2 Points) Select StatementYou Used: My example of correct results from Apex (copy): YOU MUST
  • 9. DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOT MUST SHOW YOUR WORSPACE AND BE CORRECT RESULTS IN ORDER TO RECEIVE CREDIT. (1 Point) 4. Rewrite the following query using alternate options in the WHERE clause that will accomplish the same result as shown below (Hint: Use < comparison operator to specify the track is any track less than 3). Execute the query in Oracle Application Express (Apex). (2 Points) SELECT MAX(song_id) FROM d_track_listings WHERE track IN ( 1, 2, 3); Select Statement You Used: My example of correct results from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOT MUST SHOW YOUR WORSPACE AND BE CORRECT RESULTS IN ORDER TO RECEIVE CREDIT. (1 Point)
  • 10. Section 6 Objectives: Creating Subqueries Create and execute single and multiple row subqueries Try It / Solve It: In order to be successful with this lab, you must review the ‘Oracle Student Tables’ file located under ‘Videos and Resources’ (multiple tabs across bottom of worksheet). This file will help you to understand the data that is being manipulated in the SQL statements. I amproviding a ‘copy’ (first 20 rows) of the ‘Results from Apex’ for each question. Hopefully, this will help you see if you are on track with your results. At the top of your SQL window, you can increase the number of rows displayed. You will provide the SQL statement you used to produce shown results AND you will provide a screen shot of your results. In order to receive points, your screenshot MUST include your workspace number. 1. Create a query that displays the first_name and last_name for all employees who have the same department ID as the IT Department. Use a column alias so that first_name displays as First Name and last_name displays as Last Name. You will be gathering data from the employees and departments tables. Execute the query in Oracle Application Express (Apex). (2 Points) Select Statement You Used:
  • 11. My example of correct results from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOT MUST SHOW YOUR WORSPACE AND BE CORRECT RESULTS IN ORDER TO RECEIVE CREDIT. (1 Point) 2. Create a query that displays the first name and last name of employees who have the same job id as Rajs and was hired after Davies. Use a column alias so that first_name displays as First Name and last_name displays as Last Name. You will be gathering data from the employees table. Execute the query in Oracle Application Express (Apex). (2 Points) Select Statement You Used: My example of correct results from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOT MUST SHOW YOUR WORSPACE AND BE CORRECT RESULTS IN ORDER TO RECEIVE CREDIT. (1 Point) 3. Create a query that will find and display the last names of all employees whose salaries are the same as the minimum salary for any department. Use a column alias so that last_name displays as Last Name. You will be gathering data from the employees table. Execute the query in Oracle Application Express (Apex). (2 Points)
  • 12. Select Statement You Used: My example of correct results from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOT MUST SHOW YOUR WORSPACE AND BE CORRECT RESULTS IN ORDER TO RECEIVE CREDIT. (1 Point) Section 7 Objectives: Updating Column Values and Deleting Rows Use the INSERT statement Create and execute an UPDATE and DELETE statementExplain how foreign-key and primary-key integrity constraints affect UPDATE and DELETE statements Vocabulary: Directions: Identify the vocabulary word for each definition below. (1 Point each) 1. Modifies existing rows in a table. Answer: 2. Ensures the data adheres to a predefined set of rules. Answer: 3. Removes ONE row from a table. Answer:
  • 13. Try It / Solve It: You will need to log into Apex at https://iacademy.oracle.com" https://iacademy.oracle.com in order to complete this portion of the assignment. NOTE: You will need to execute the SQL statement below in order to copy the ‘customers’ table (f_customers). This will leave the f_customers table as is, while you modify the copy (copy_f_customers). CREATE TABLE copy_f_customers AS (SELECT * FROM f_customers); Table copies will not inherit the associated primary-to-foreign- key integrity rules (relationship constraints) of the original tables. The column data types, however, are inherited in the copied tables. If a change is not possible, give an explanation as to why it is not possible. 1. Insert the new customers shown below to the copy_f_customers table. Execute in Oracle Application Express (Apex). (3 Points) ID FIRST_ NAME LAST_ NAME ADDRESS CITY STATE ZIP PHONE_ NUMBER 511 Kathy
  • 14. Harper 2 Willy Way Los Angeles CA 98008 8586667641 225 Daniel Spode 1923 Silverado Denver CO 80219 4258879009 230 Adam Zurn 5 Admiral Way Seattle WA 7193343523 Select Statements You Used:
  • 15. Using Select * from copy_f_customers, provide a screen shot of your inserted records. Why are you not able to insert Adam Zurn?(1 Point) Your Answer: My example of correct results from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOT MUST SHOW YOUR WORSPACE AND BE CORRECT RESULTS IN ORDER TO RECEIVE CREDIT. (1 Point) 2. Make a copy of the f_staffs table. Name the copy copy_f_staffs. Execute: Select * from copy_f_staffs to view contents of the table. Sue Doe has been an outstanding Global Foods staff member and has been given a salary raise. She will now be paid the same as Bob Miller. Update her record in copy_f_staffs so that she is paid the same salary as Bob Miller. Execute the query in Oracle Application Express (Apex). (2 Points) Select Statement You Used:
  • 16. Using Select * from copy_f_staffs, provide a screen shot of your updated record. My example of correct results from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOT MUST SHOW YOUR WORSPACE AND BE CORRECT RESULTS IN ORDER TO RECEIVE CREDIT. (1 Point) 3. Execute the following SQL statement. Explain your results. Execute the query in Oracle Application Express (Apex). (2 Points) DELETE from departments WHERE department_id = 60; Explain the integrity constraint error Your Answer: 4. Sue Doe has decided to go back to college and does not have the time to work and go to school. Delete her from the Global Fast Foods staff (copy_f_staffs table). Verify that the change was made. Execute the query in Oracle Application Express (Apex). (2 Points) Select Statement You Used:
  • 17. Using Select * from copy_f_staffs, provide a screen shot of your table after deleting Sue Doe. My example of correct results from Apex (copy): YOU MUST DELETE MY SCREEN SHOT BELOW AND INSERT YOUR OWN. YOUR SCREEN SHOT MUST SHOW YOUR WORSPACE AND BE CORRECT RESULTS IN ORDER TO RECEIVE CREDIT. (1 Point)