Assignment : PL/SQL Practice Note: PL/SQL can be executed in SQL*Plus or SQL Developer or Oracle Live SQL. Write an anonymous PL/SQL block that will insert a new doctor into the DOCTOR Verify that insert has been done successfully by issuing a select * from doctor.
Q: Given a table students in SQL. Write a SQL query to add a column Address Varchar(30) in the student…
A: Given Table: students We have to add a new column Address Varchar(30) to the given table students.…
Q: Create a function name BALANCE that returns the status of outstanding amount for each customer. Use…
A: Required : Function name : BALANCE It returns the status of outstanding amount for each customer. IF…
Q: Oracle PL/SQL Create an anonymous block that prints all instructors First Name, Last name, and a…
A: Anonymous block means where it has a PL/SQL programs unit that does not have a name. It has an…
Q: SOQL Assignment Salesforce: You have to write a SOQL query in which we have to find out all the…
A: Use the Salesforce Object Query Language (SOQL) to search your organization’s Salesforce data for…
Q: Assignment : PL/SQL Practice Note: PL/SQL can be executed in SQL*Plus or SQL Developer or…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: Section B- EXCEPTION HANDLING TASK 1 Write a PL/SQL block to retrieve employees from the ENEW table…
A: Answer: PL/SQL example table query: create table ENEW(empID int not null primary key,empName…
Q: Exercise 1: Addresses in Bahrain are identified using three numbers separated using commas and one…
A:
Q: SOQL Assignment: You have to write a SOQL Query In which we have to find all the contact whose…
A: Intro: This is Salesforce Object Query Language designed to work with SFDC Database. It can search a…
Q: SOQL Assignment Salesforce: You have to write a SOQL query in which we have to find out all the 1000…
A: Use the Salesforce Object Query Language (SOQL) to search your organization’s Salesforce data for…
Q: This does not work: CREATE OR REPLACE TRIGGER trg_char_hours AFTER INSERT ON CHARTER FOR EACH ROW…
A: Question: This does not work: CREATE OR REPLACE TRIGGER trg_char_hoursAFTER INSERT ON CHARTERFOR…
Q: In sql get to know the HR database, its tables, and their contents. Show the SQL query and the…
A: SQL: SQL stands for a structured query language, it used to manage the data and organize the data in…
Q: Database course: Write SQL queries to do the following A. List names of IT students.…
A: The SQL queries are given in step 2.
Q: SQL QUERIES Employees(EMPLOYEE_ID,FIRST_NAME,LAST_NAME,EMAIL,PHONE_NUMBER,HIRE_D…
A: The answer for the above mentioned question is given below in step 2.
Q: SQL Query for Outputting Sorted Data Using Group By Clause
A: In this question we need to provide the syntax for outputting sorted data using GROUP BY clause.
Q: PL/SQL Create a simple loop that prints instructor names, where instructor IDs are in the range…
A: Required: PL/SQL Create a simple loop that prints instructor names, where instructor IDs are in…
Q: I am trying ro create this java program , i have the table in my tatabase . I am using postgresql ii…
A: Program Instructions:Add the postgresql jar file in your project library.Create a database and a…
Q: database development write a function and funcation call program in PL/SQL to sum the even integers…
A: Algorithm: Start Declare necessary variables Initialize sum to 0 and num to 1 define a function…
Q: Q1: Write a query to find the students working in a company having more ratings than their seniors
A: select student_name from EMPLOYEES RATING TABLE where designation != senior and rating >= 9
Q: True or FalseString comparisons in SQL are case sensitive.
A: Explanation: The data in DBMS is stored and retrieved by using a specific language called SQL. DBMS…
Q: Write the T-SQL scripts for the following tasks: Write a query to list the employees whose email is…
A: SELECT * FROM EMPLOYEES WHERE EMP_MAIL LIKE '%gmail.com';
Q: PL/SQL The following PL/SQL code implements a cursor and displays the first 3 highest students’…
A: The modified code to output the average of the top three grades is....
Q: Note: PL/SQL can be executed in SQL*Plus or SQL Developer or Oracle Live SQL. 1. Write an anonymous…
A: SOLUTION: Below schema is used for this exercise : CREATE TABLE "DOCTOR" ( "DOC_ID" NUMBER,…
Q: Exercise 1: Addresses in Bahrain are identified using three numbers separated using commas and one…
A: According to bartleby guidelines we need to solve only the first question, so please repost the…
Q: Write a script to create a PL/SQL procedure called findSal that displays the doctor’s salary and…
A: A procedure is created with the CREATE OR REPLACE PROCEDURE statement. The simplified syntax for the…
Q: Task 2 Stored PL/SQL procedure Implement a stored PL/SQL procedure PARTSUPPLIER that lists…
A: For task 1 Tab_Sup is supplier table name having columns Sup_name, Sup_key Tab_Part is part table…
Q: QL QUERIES Employees(EMPLOYEE_ID,FIRST_NAME,LAST_NAME,EMAIL,PHONE_NUMBER,HIRE_D…
A: To write a query in SQL for the above criteria. 1.SQL Min() and Max() functions are used to find the…
Q: Computer Science WRITE A PL/SQL PROGRAM TO CHECK, IF THE TEACHER IS PRESENT IN THE TEACHER…
A: The pl/sql code for the following has been mentioned below.
Q: Instructor (Instructor_Id, Instructor_Name, specialization, Address, #Department_Id) Write in…
A: First we have to create a table Instructor with details such as Instructor_name, Specialization,…
Q: T-SQL procedure for MICROSOFT SQL SERVER A: obtain the name and credit limit of the customer…
A: Given : T-SQL procedure for MICROSOFT SQL SERVER A: obtain the name and credit limit of the customer…
Q: hmand using Query Analyzer will give you the version of SQL
A: Below the command using query Analyzer will give the version of SQL server and opearting system
Q: INFO 2303 Database Programming Assignment : PL/SQL Practice Note: PL/SQL can be executed…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: In PL/SQL, Create a recursive store function called add_numbers to calculate the total of all…
A: Program plan:Declare the required variables.The “add_numbers” function returns the value. Otherwise,…
Q: in sql The EMPLOYEE table contains these columns: EMP_ID NOT NULL, Primary Key SSNUM NOT NULL,…
A: Answer to the above question is in step2.
Q: ISBN Title Author 12345678 The Hobbit J.R.R. Tolkien 45678912 DaVinci Code Dan Brown Your student ID…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: What method of Statement is used if you want to execute DELETE SQL statement?
A: Answer:
Q: PL/SQL Display the full name (first and last) and salary of all employees in descending order…
A: The select keyword will be used for displaying the names from the table employees. The DESC keyword…
Q: Write the code steps to do the following within SQL Create a database, this database includes two…
A: #Creating a new database and creating a CustomerInfo table and CustomerDepartment table: CREATE…
Q: Next, write a SQL statement to create a single column relational table MESSAGE to store variable…
A: NOTE: I HAVE ONLY GIVEN THE ANSWER FOR FOURTH PART AS ASKED BY YOU, IF YOU WISH TO HAVE ANSWERS FOR…
Q: develop PL/SQL program that asks for a radius of a circle. After user enters a radius number, the…
A: Algorithm: Start Read radius Using the formula 2*3.14*radius calculate perimeter Display perimeter…
Q: Assume that you have a table Anc that contains two columns: employee name e namen and the salary…
A: Revoke syntax:- To increase sal column by 15% , use sal+sal*15/100 revoke permissionName on…
Q: There's a "users" table that has more than 1M rows of "users" information. The image below are the…
A: There's a "users" table that has more than 1M rows of "users" information. The image below is the…
Q: In sql get to know the HR database, its tables, and their contents. Show the SQL query and the…
A: SQL stands for Structured Query Language. SQL is a database computer language designed for the…
Q: A cake shop named "Whisk" has an online presence. It has multiple flavors of cakes supplied by…
A: The database management system is the collection of data and information related to an organization.…
Q: A Trigger is executed when you insert, update or delete data in a Table specified in the Trigger.…
A: Syntax CREATE TRIGGER <TriggerName> on <TableName> FOR INSERT, UPDATE, DELETE AS \Create…
Q: SQL is a programming language used by database developers to query data. You are required to write…
A: A note ?as per our company guidelines we are supposed to answer ?️only first 3️⃣ sub-parts. Kindly…
Q: String comparision in sql case sensitive.True or False.
A: This question comes from Database Management System which is a part of computer science. Let's…
Q: SQL Database Write PL/SQL or T-SQL procedures to accomplish the following tasks: Obtain the…
A: Note: As per our company guidelines we are supposed to answer only first 3 sub-parts. Kindly repost…
Q: on this table CREATE TABLE students ( std_id int NOT NULL PRIMARY KEY, f_name VARCHAR2(20),…
A: Answer has been explained below:-
Assignment : PL/SQL Practice
Note: PL/SQL can be executed in SQL*Plus or SQL Developer or Oracle Live SQL.
Write an anonymous PL/SQL block that will insert a new doctor into the DOCTOR Verify that insert has been done successfully by issuing a select * from doctor.
Step by step
Solved in 2 steps
- Change the CONTACT view so that no users can accidentally perform DML operations on the view.In the initial creation of a table, if a UNIQUE constraint is included for a composite column that requires the combination of entries in the specified columns to be unique, which of the following statements is correct? a. The constraint can be created only with the ALTER TABLE command. b. The constraint can be created only with the table-level approach. c. The constraint can be created only with the column-level approach. d. The constraint can be created only with the ALTER TABLE MODIFY command.Task 2: The Car Maintenance team also wants to store the actual maintenance operations in the database. The team wants to start with a table to store CAR_ID (CHAR(5)), MAINTENANCE_TYPE_ID (CHAR(5)) and MAINTENANCE_DUE (DATE) date for the operation. Create a new table named MAINTENANCES. The PRIMARY_KEY should be the combination of the three fields. The CAR_ID and MAINTENACNE_TYPE_ID should be foreign keys to their original tables. Cascade update and cascade delete the foreign keys. Answer in MYSQL please
- The Car Maintenance team also wants to store the actual maintenance operations in the database. The team wants to start with a table to store CAR_ID (CHAR(5)), MAINTENANCE_TYPE_ID (CHAR(5)) and MAINTENANCE_DUE (DATE) date for the operation. Create a new table named MAINTENANCES. The PRIMARY_KEY should be the combination of the three fields. The CAR_ID and MAINTENACNE_TYPE_ID should be foreign keys to their original tables. Cascade update and cascade delete the foreign keys.Task 2: The Car Maintenance team also wants to store the actual maintenance operations in the database. The team wants to start with a table to store CAR_ID (CHAR(5)), MAINTENANCE_TYPE_ID (CHAR(5)) and MAINTENANCE_DUE (DATE) date for the operation. Create a new table named MAINTENANCES. The PRIMARY_KEY should be the combination of the three fields. The CAR_ID and MAINTENANCE_TYPE_ID should be foreign keys to their original tables. Cascade update and cascade delete the foreign keys. SQL DataBase Test: Create a new table to store maintenance operations Test Query: DESCRIBE MAINTENANCES Expected Results Field Type Null Key Default Extra CAR_ID char(5) NO PRI NULL MAINTENANCE_TYPE_ID char(5) NO PRI NULL MAINTENANCE_DUE date NO PRI NULLTask 2: The Car Maintenance team also wants to store the actual maintenance operations in the database. The team wants to start with a table to store CAR_ID (CHAR(5)), MAINTENANCE_TYPE_ID (CHAR(5)) and MAINTENANCE_DUE (DATE) date for the operation. Create a new table named MAINTENANCES. The PRIMARY_KEY should be the combination of the three fields. The CAR_ID and MAINTENANCE_TYPE_ID should be foreign keys to their original tables. Cascade update and cascade delete the foreign keys. Create a new table to store maintenance operations Test Query DESCRIBE MAINTENANCES Expected Results Field Type Null Key Default Extra CAR_ID char(5) NO PRI NULL MAINTENANCE_TYPE_ID char(5) NO PRI NULL MAINTENANCE_DUE date NO PRI NULL
- Create a new table named BOOK_TYPE in the finalexam database. The BOOK_TYPE table has two character columns: TYPE has a length of 3 characters and is the table’s primary key, and DESCRIPTION has a length of 20 characters.xplain Local Descriptor Table?CREATE TABLE DOCTOR(DOC_ID NUMBER(3),DOC_NAME VARCHAR2(9),DATEHIRED DATE,SALPERMON NUMBER(12),AREA VARCHAR2(20),SUPERVISOR_ID NUMBER(3),CHGPERAPPT NUMBER(3),ANNUAL_BONUS NUMBER(5),CONSTRAINT DOCTOR_DOC_ID_PK PRIMARY KEY (DOC_ID)); INSERT INTO DOCTOR VALUES(432, 'Harrison' , TO_DATE('05-DEC-94'), 12000,'Pediatrics', 100, 75, 4500); INSERT INTO DOCTOR VALUES(509, 'Vester' , TO_DATE('09-JAN-00'), 8100,'Pediatrics', 432, 40, null); INSERT INTO DOCTOR VALUES(389, 'Lewis' , TO_DATE('21-JAN-96'), 10000,'Pediatrics', 432, 40, 2250); INSERT INTO DOCTOR VALUES(504, 'Cotner' , TO_DATE('16-JUN-98'), 11500,'Neurology', 289, 85, 7500); INSERT INTO DOCTOR VALUES(235, 'Smith' , TO_DATE('22-JUN-98'), 4550,'Family Practice', 100, 25, 2250); INSERT INTO DOCTOR VALUES(356, 'James' , TO_DATE('01-AUG-98'), 7950,'Neurology', 289, 80, 6500); INSERT INTO DOCTOR VALUES(558, 'James' , TO_DATE('02-MAY-95'), 9800,'Orthopedics', 876, 85, 7700); INSERT INTO DOCTOR VALUES(876, 'Robertson' , TO_DATE('02-MAR-95'),…
- CREATE TABLE DOCTOR(DOC_ID NUMBER(3),DOC_NAME VARCHAR2(9),DATEHIRED DATE,SALPERMON NUMBER(12),AREA VARCHAR2(20),SUPERVISOR_ID NUMBER(3),CHGPERAPPT NUMBER(3),ANNUAL_BONUS NUMBER(5),CONSTRAINT DOCTOR_DOC_ID_PK PRIMARY KEY (DOC_ID)); INSERT INTO DOCTOR VALUES(432, 'Harrison' , TO_DATE('05-DEC-94'), 12000,'Pediatrics', 100, 75, 4500); INSERT INTO DOCTOR VALUES(509, 'Vester' , TO_DATE('09-JAN-00'), 8100,'Pediatrics', 432, 40, null); INSERT INTO DOCTOR VALUES(389, 'Lewis' , TO_DATE('21-JAN-96'), 10000, 'Pediatrics', 432, 40, 2250); INSERT INTO DOCTOR VALUES(504, 'Cotner' , TO_DATE('16-JUN-98'), 11500,'Neurology', 289, 85, 7500); INSERT INTO DOCTOR VALUES(235, 'Smith' , TO_DATE('22-JUN-98'), 4550, 'Family Practice', 100, 25, 2250); INSERT INTO DOCTOR VALUES(356, 'James' , TO_DATE('01-AUG-98'), 7950,'Neurology', 289, 80, 6500); INSERT INTO DOCTOR VALUES(558, 'James' , TO_DATE('02-MAY-95'), 9800, 'Orthopedics', 876, 85, 7700); INSERT INTO DOCTOR VALUES(876, 'Robertson' , TO_DATE('02-MAR-95'),…CREATE TABLE DOCTOR(DOC_ID NUMBER(3),DOC_NAME VARCHAR2(9),DATEHIRED DATE,SALPERMON NUMBER(12),AREA VARCHAR2(20),SUPERVISOR_ID NUMBER(3),CHGPERAPPT NUMBER(3),ANNUAL_BONUS NUMBER(5),CONSTRAINT DOCTOR_DOC_ID_PK PRIMARY KEY (DOC_ID)); INSERT INTO DOCTOR VALUES(432, 'Harrison' , TO_DATE('05-DEC-94'), 12000,'Pediatrics', 100, 75, 4500); INSERT INTO DOCTOR VALUES(509, 'Vester' , TO_DATE('09-JAN-00'), 8100,'Pediatrics', 432, 40, null); INSERT INTO DOCTOR VALUES(389, 'Lewis' , TO_DATE('21-JAN-96'), 10000,'Pediatrics', 432, 40, 2250); INSERT INTO DOCTOR VALUES(504, 'Cotner' , TO_DATE('16-JUN-98'), 11500,'Neurology', 289, 85, 7500); INSERT INTO DOCTOR VALUES(235, 'Smith' , TO_DATE('22-JUN-98'), 4550,'Family Practice', 100, 25, 2250); INSERT INTO DOCTOR VALUES(356, 'James' , TO_DATE('01-AUG-98'), 7950,'Neurology', 289, 80, 6500); INSERT INTO DOCTOR VALUES(558, 'James' , TO_DATE('02-MAY-95'), 9800,'Orthopedics', 876, 85, 7700); INSERT INTO DOCTOR VALUES(876, 'Robertson' , TO_DATE('02-MAR-95'),…CREATE TABLE DOCTOR(DOC_ID NUMBER(3),DOC_NAME VARCHAR2(9),DATEHIRED DATE,SALPERMON NUMBER(12),AREA VARCHAR2(20),SUPERVISOR_ID NUMBER(3),CHGPERAPPT NUMBER(3),ANNUAL_BONUS NUMBER(5),CONSTRAINT DOCTOR_DOC_ID_PK PRIMARY KEY (DOC_ID)); INSERT INTO DOCTOR VALUES(432, 'Harrison' , TO_DATE('05-DEC-94'), 12000,'Pediatrics', 100, 75, 4500); INSERT INTO DOCTOR VALUES(509, 'Vester' , TO_DATE('09-JAN-00'), 8100,'Pediatrics', 432, 40, null); INSERT INTO DOCTOR VALUES(389, 'Lewis' , TO_DATE('21-JAN-96'), 10000,'Pediatrics', 432, 40, 2250); INSERT INTO DOCTOR VALUES(504, 'Cotner' , TO_DATE('16-JUN-98'), 11500,'Neurology', 289, 85, 7500); INSERT INTO DOCTOR VALUES(235, 'Smith' , TO_DATE('22-JUN-98'), 4550,'Family Practice', 100, 25, 2250); INSERT INTO DOCTOR VALUES(356, 'James' , TO_DATE('01-AUG-98'), 7950,'Neurology', 289, 80, 6500); INSERT INTO DOCTOR VALUES(558, 'James' , TO_DATE('02-MAY-95'), 9800,'Orthopedics', 876, 85, 7700); INSERT INTO DOCTOR VALUES(876, 'Robertson' , TO_DATE('02-MAR-95'),…