Write a PL/SQL program which will insert a new record into the Departments table. You are...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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), 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),
Expert Answer:
Answer rating: 100% (QA)
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... View the full answer
Related Book For
Introduction To Management Science and Business Analytics A Modeling And Case Studies Approach With
ISBN: 9781260716290
7th Edition
Authors: Frederick S. Hillier, Mark S. Hillier
Posted Date:
Students also viewed these databases questions
-
a) Explain the following terms as used in real estate appraisals i. Value in use ii. iii. Liquidation value Insurable value b) Describe the cost approach of real estate valuation c) Explain the...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
As you might imagine, the chart of accounts for a manufacturing firm would be different from that of a service firm. Not surprisingly, service firms differ so much that software now exists for almost...
-
For the beam shown, determine (a) the maximum tensile and compressive bending stresses, (b) The maximum shear stress due to V, and (c) the maximum shear stress in the beam.
-
Howsham Company, Ltd. reports the following for the month of June. Instructions (a) Calculate the cost of the ending inventory and the cost of goods sold for (1) FIFO and (2) moving-average cost,...
-
There are 20 finalists in an inter-school dancing competition. The top three students will receive prize money. How many ways can the dancers finish first through third?
-
Justin Stone was an employee of Data Care Services, Inc. His salary was $45,000 through November 10, 2015, when he was laid off. Data Care Services provided medical insurance for Justin and his...
-
An iron block with a mass of 45 000 g rests on an incline plane of 16 to the horizontal. Take the coefficient friction as 0,25. Calculate the following: 1.1 the weight component perpendicular to the...
-
Chemco Inc. manufactures a combination fertilizer/weed-killer under the name Fertikil. It is the only product produced by Chemco at the present time. Fertikil is sold nationwide, through normal...
-
Discuss the meaning of sound banking industry.From the risk perspective ,what are the most important factors to consider when running a banking institution?
-
The purpose of writing the analysis on Roger Ferguson's Zoom is to demonstrate why he used specific ideas, word choices, or writing structures in his book to convey his message. A few things that...
-
Compare the payment system between U.S. and Japan Please explain and use valid points paragraph format use examples
-
Identify the current issues and come up with your own CSR initiative to tackle it including - the approach, challenges, opportunities & impact you would create. Please explain it as your company.
-
A call center technical specialist spends varying amount of time in each call to resolve the concern. The time spent in each call is modeled using the following distribution: X~ Exp (0.2). Find the...
-
You are a nurse manager and one of your staff needs to be out on medical leave for a minor procedure. She is expected to return in a week but calls and states she will need an additional week. You...
-
QUESTION 1 During what period did Greek sculptures begin to portray the female nude? OA. Hellenistic B. Archaic O C. Classical QUESTION 2 Are the ceiling fresco figures of the Sistine Chapel derived...
-
If 2 5 9 - k 5 8 = 2 5 8 , what is the value of k?
-
What is the shape of the utility function for money for a risk-averse individual? A risk-seeking individual? A risk-neutral individual?
-
What is the 100 percent rule for simultaneous changes in right-hand sides?
-
What are fixed costs?
-
The following is the trial balance of Sangeeta Udhyog Ltd. as on 31st March 2006. Further information 1.The authorised share capital of the company consists of 4,00,000 equity shares of ` 10 each. 2....
-
The trial balance of Hindustan Textiles Ltd. as at 31st March 2006 is as presented hereunder. Further information 1.The authorized capital of the company is 30 lakh equity shares of 10 each of which...
-
Following trial balance as at 31st March 2006 has been prepared from the account books of Mahesh Foods Ltd. Further information 1.The authorized capital of the company is 3 lac equity shares of ` 10...
Study smarter with the SolutionInn App