Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a PL/SQL program which will insert a new record into the Departments table. You are required to declare all the variables of the

Write a PL/SQL program which will insert a new record into the Departments table. You are required to declare

Write a PL/SQL program which will insert a new record into the Departments table. You are required to declare all the variables of the four values that will be used in the insert statement. The new department has 290 as its department_id, department name as 'Future', manager_ID as 114, location ID as 1800. After insertion, your program should display the contents of this new record. Note: please do not rollback this command, in question Q2, you are asked to delete this record. Write a PL/SQL program, in which you will delete the record with department id of 290 that was just inserted in Q1. You are required to use the RETURNING clause to store the department name into a variables, then print out the department name for the record just deleted. If you need help. please refer to the example 3 on page 9 in Note2_PLSQL_Fundamentals, section 7. Write an anonymous PL/SQL block, you are required to use Update DML command, also as Q2, to declare the correspondent variables to store the values for the RETURNING clause. For the department with ID 30, assign a new department head: the manager ID will be 114. After the update, print out this department name, the new manager ID. Please use the RETURNING clause to store these values. Make sure that you rollback at the end of the program. This question is based on the table EMPLOYEES. Write a PL/SQL block program First, retrieve the number ( how many) employees work in a department, say department ID is 80. Save this number into a variable. Declare a variable with name as dept_size, data type as char (7),

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Solution Heres a series of PLSQL programs to perform the tasks you described 1 Insert a new record into the Departments table DECLARE vdepartmentid NU... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Management Science and Business Analytics A Modeling And Case Studies Approach With Spreadsheets

Authors: Frederick S. Hillier, Mark S. Hillier

7th Edition

1260716295, 9781260716290

More Books

Students also viewed these Databases questions

Question

=+12 Prepare a budgeted income statement (ignore income taxes).

Answered: 1 week ago

Question

What-if anything-would you say to your other students?

Answered: 1 week ago

Question

Give codons for the following amino acids: (a) Th (b) Asp (c) Thr

Answered: 1 week ago

Question

What are fixed costs?

Answered: 1 week ago

Question

Which are the strongest parts?

Answered: 1 week ago

Question

Which character has an opposite script?

Answered: 1 week ago