Write a script to create a PL/SQL procedure called findSal that displays the doctor’s salary and bonus after passing in the doc_id into the procedure. For example, if you pass in doc_id 504, you will get the following output.
Q: An organization has committed to matching pledge amounts based on the donor type and pledge amount.…
A: The PL/SQL is in the next step-
Q: OB. The function must contain a return statement. Oc.It is similar to the PL/SQL procedure except…
A: Which of the following is not true about the PLSQL functions? OPTION : B
Q: Please develop PL/SQL program that asks for a radius of a circle. After user enters a radius number,…
A: Syntax to implement IF statement: IF condition THEN statements; ELSEIF condition THEN…
Q: Create a PL/SQL Program that asks user to enter 2 numbers, then finds an average of two numbers and…
A: PL/SQL program is : SET SERVEROUTPUT ON;DECLAREv_x NUMBER :=&first;v_y NUMBER…
Q: in sql ,create a program that prompts the user for a number. This number will be top (cap) number.…
A:
Q: 5. Use XAMPP Control Panel (My SQL) to answer the following questions. Write SQL queries statement…
A: CODE:- Creating table PROPERTY and inserting values in it:- -- create table PROPERTY CREATE…
Q: Exercise 1: Addresses in Bahrain are identified using three numbers separated using commas and one…
A:
Q: The system variable that records the select statement that SQL * FORMS most recently used to…
A: Question. The system variable that records the select statement that SQL * FORMS most recently used…
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: Ask the user their name and how many times they want to output their name (using a for loop). )…
A: Since no programming language is mentioned, I am using python 1. Algorithm: Start Read name and…
Q: Question 11 You usually use _______ to reference data values that programs retrieve from the DB.…
A: Data stored in database can be referenced in program to use and reflect back to database.
Q: Student (snum: integer, sname: string, major: string, level: string, age: integer) Class (cname:…
A: CREATE TABLE student( snum INT, sname VARCHAR(10),…
Q: Guideline: Pls create employees table and populate it with the scripts provided for you (if the…
A: Answer: Our instruction is answer the first three part from the first part and I have given SQL…
Q: Write three functions in SQL which does the following: The first function should take an integer…
A: In MYSQL function Syntax to convert number from one base to another follows:- CONV(<num to…
Q: please code this in SQL Language
A: The database generation code in mysql is provided below:
Q: MS SQL SERVER Write a statement to create a stored procedure named Find_Contact based on the…
A: ANSWER:-
Q: AL Distributors would like to know the number of months between the current date and the order date…
A: According to the Question below the Solution:
Q: Case logic can compare a single value or expression and returns à single value for each condition…
A: 1. The CASE statement allows one to select one sequence of statements to execute out of many…
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: Below is part of a Student database. The primary keys are highlighted in bold. Student (studNo,…
A: Given to write a PL/SQL PROCEDURE that will list the project names given the course ID. The below…
Q: USE NORTHWIND DATABASE Write a SELECT statement using the CASE function. The statement returns two…
A: sql select statement for above question is shown in step2
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: Example: Parameter style JAVA procedure with XML parameters This example shows the following: •…
A: Code to create a parameter style JAVA procedure with XML parameters CREATE PROCEDURE xmlProc1 ( IN…
Q: mysqli_query($conn, $sql); if (mysqli_num_rows($result) === 1) { $row =…
A: Lets see the solution.
Q: Create a function that converts temperature from Fahrenheit to Celsius. You need to use the most…
A: To create a User Defined Function (UDF) that converts Temperature from Fahrenheit to Celsius, that…
Q: Do the steps below in microsoft SQL server management studio. -create Authors and Books relations.…
A: Note : As you have posted multiple sub-parts, I am answering 1st 3 sub parts according to the…
Q: In SQL, you use the __ statement to retrieve the rows in a table. Question 7 options: SELECT…
A: Given: In SQL, you use the __ statement to retrieve the rows in a table. Question 7 options:…
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: Please develop PL/SQL program that asks for a radius of a circle. After user enters a radius number,…
A: Syntax to implement IF statement: IF condition THEN statements; ELSEIF condition THEN…
Q: n this assignment, we use the same database that you have been using for the labs and the assignment…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: Replace 456 with your last 3 digits in your student number The procedure must have: an input…
A: Code is given below. drop table VECHICLERENT; CREATE TABLE VECHICLERENT ( VEHICLE_ID…
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: Write the difference between the characters' two data types in SQL Server: VARCHAR NVARCHAR
A: Data types: While creating a table in the database, each and every column of the table will be…
Q: .use sql to Write a SQL query from the following data (as shown below)to display the number of…
A: 1. Display the number of the customer with a total amount over all orders average SELECT…
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: db is a SQLiteDatabase reference; sql is a String representing a delete SQL statement. Write a…
A: To erase existing records from a table, use the SQLite DELETE Query. If we used the WHERE clause…
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: his question is related to pl/SQL:- Using a Cursor in a Package In this assignment, you work with…
A: Answer: I have given answer in the handwritten format
Q: Assume the following tables: Student (studid, email, name) Club (clubid, telephone, name,…
A: Create in PL/SQL a stored Procedure called 'CheckavailabilityProc' to call the function…
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: 5. Use XAMPP Control Panel (My SQL) to answer the following questions. Write SQL queries statement…
A: Here we have given queries for creating tables and assigned primary and foreign keys. You can find…
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: ) Output the times-tables (from 1 to 12) for whichever number the user requests. For example, if…
A: the program is an given below:
INFO 2303
Assignment # : PL/SQL Procedure & Function Practice
Note: PL/SQL can be executed in SQL*Plus or SQL Developer or Oracle Live SQL.
- Write a script to create a PL/SQL procedure called findSal that displays the doctor’s salary and bonus after passing in the doc_id into the procedure. For example, if you pass in doc_id 504, you will get the following output.
execute findSal(504)
The salary for Dr.Cotner (504) is: 11500
The bonus is: 7500
PL/SQL procedure successfully completed.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- plz quickly ?????????????? /*Inserting into patient table*/ INSERT INTO patientVALUES ('1234','Kim Minji','06-05-1994','0557375017'); INSERT INTO patientVALUES ('1334','Han Sohee','06-07-1996','0567374017'); INSERT INTO patientVALUES ('1434','Jeon soyeon','07-10-1998','0537372017'); INSERT INTO patientVALUES ('1646','Lee Taemin','18-06-1993','0501346257'); INSERT INTO patientVALUES ('1645','Yu jimin','11-09-2000','0501846257'); select*from patient; /*Inserting into Doctor table*/INSERT INTO DOCTOR VALUES(2000432, 'khaled' , '05-12-1994' , 0556677880,'Dermatologists'); INSERT INTO DOCTOR VALUES(2000509, 'Ali' , '09-01-2000' , 0559918100, 'Dentistry'); INSERT INTO DOCTOR VALUES(2000389, 'Lewis' ,'21-01-1996' , 0559910000,'Family Physicians'); INSERT INTO DOCTOR VALUES(2000504, 'Saleh' ,'16-06-1998' , 055611500,'Family Physicians'); INSERT INTO DOCTOR VALUES(2000235, 'sara' ,'22-06-1998', 0557745500,'Orthopedics'); select *from doctor; /*Inserting into appointment table*/ INSERT INTO…Create table Medicine (MInventory_Id int primary key, M_Name varchar (40), Manufacturer varchar (40), Price varchar (20), Quantity int, Exp_Date date); Create table PrescriptionMedicine (Prescription_Id int primary key, MInventory_Id int); Example of a table (Medicine) Insert into Medicine values(101, ‘Biaxin’, ‘Pfizers’, ‘$10.99’, 1, 10/5/02); Insert into Medicinecreate table patients ( patient_id VARCHAR(255),name VARCHAR(255),insurance DECIMAL(15,2),date_admitted DATE,date_checked_out DATE,PRIMARY KEY(patient_id));INSERT INTO patients (ID , name , insurance , date_admitted , date_checked_out) values (2 , 'Ali' , '22.2' , '2/1/2020' , '3/1/2020')SELECT * FROM table patients create table doctor (doctor_id VARCHAR(255),name VARCHAR(255),specialization VARCHAR(255),PRIMARY KEY (doctor_id) ); create table test (test_id VARCHAR(255),test_name VARCHAR(255),test_date DATE,test_time TIME,result VARCHAR(255),PRIMARY KEY(test_id)); create table doctor_patient( patient_id VARCHAR(255), doctor_id VARCHAR(255),PRIMARY KEY(patient_id),FOREIGN KEY(doctor_id) REFERENCES doctor(doctor_id) ); create table test_log (test_log_id varchar(255),patient_id VARCHAR(255),test_id VARCHAR(255),doctor_id VARCHAR(255),comments VARCHAR(255),PRIMARY KEY(test_log_id),FOREIGN KEY(test_id) REFERENCES test(test_id),FOREIGN KEY(patient_id) REFERENCES…
- create table patients ( patient_id VARCHAR(255),name VARCHAR(255),insurance DECIMAL(15,2),date_admitted DATE,date_checked_out DATE,PRIMARY KEY(patient_id));INSERT INTO patients (ID , name , insurance , date_admitted , date_checked_out) values (2 , 'Ali' , '22.2' , '2/1/2020' , '3/1/2020')SELECT * FROM table patients create table doctor (doctor_id VARCHAR(255),name VARCHAR(255),specialization VARCHAR(255),PRIMARY KEY (doctor_id) ); create table test (test_id VARCHAR(255),test_name VARCHAR(255),test_date DATE,test_time TIME,result VARCHAR(255),PRIMARY KEY(test_id)); create table doctor_patient( patient_id VARCHAR(255), doctor_id VARCHAR(255),PRIMARY KEY(patient_id),FOREIGN KEY(doctor_id) REFERENCES doctor(doctor_id) ); create table test_log (test_log_id varchar(255),patient_id VARCHAR(255),test_id VARCHAR(255),doctor_id VARCHAR(255),comments VARCHAR(255),PRIMARY KEY(test_log_id),FOREIGN KEY(test_id) REFERENCES test(test_id),FOREIGN KEY(patient_id) REFERENCES…CREATE TABLE Users( C_Id varchar(8) NOT NULL, LastName Varchar(255) NOT NULL, FirstName varchar(255) NOT NULL, ema il varchar(255), Phone int, PRIMARY KÉY (C_Id) CREATE TABLE Restaurants( R_Id varchar(255) NOT NULL, Rname varchar(255) NOT NULL, Type varchar(255), Raddress varchar(255), Rphone int, Remail varchar(255), PRIMARY KEY(R_Id) ); CREATE TABLE RDate( T_num int NOT NULL, Bdate DATE, Rdate DATE, T_start varchar(255), E_start varchar(255), PRIMARY KEY(T_num) ); CREATE TABLE Book ingInfo( C_Id varchar(8) NOT NULL, R_Id int NOT NÚLL, PRIMARY KEY(C_Id, R_Id), FOREIGN KEY (C_Ià) REFERENCES Users(C Id), FOREIGN KEY (R_Id) REFERENCES Restaurant(R_Id) ); CREATE TABLE Rating( R_Id varchar(255) NÓT NULL, Rating Id varchar(255) NOT NULL, Rate varchar(255) CHECK (Rate>11), Comment LONG, PRIMARY KEY(Rating Id), FOREIGN KEY (R_Id) REFERENCES Restaurants(R_Id) ); Create 1 procedure Create 1 function Create 1 database trigger |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 test( test_id INTEGER PRIMARY KEY, test_name varchar2 (255) ,t_date DATE, t_result varchar2(255));ALTER TABLE test ADD (t_time varchar2(1));INSERT INTO test values ('5454','corona','monday','11:15PM','positive'); (6567,'corona','sunday','10:50AM','negative');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 database GA2gouse GA2gocreate table salesman(salesman_id int primary key, name varchar(30), city varchar(20), commission varchar(30));insert into salesman (salesman_id, name, city, commission) values (5001, 'James Hoog', 'New York', 0.15); insert into salesman (salesman_id, name, city, commission) values (5002, 'Nail Knite', 'Paris', 0.13); insert into salesman (salesman_id, name, city, commission) values (5005, 'Pit Alex', 'London', 0.11); insert into salesman (salesman_id, name, city, commission) values (5006, 'Mc Lyon', 'Paris', 0.14); insert into salesman (salesman_id, name, city, commission) values (5007, 'Paul Adam', 'Rome', 0.13); insert into salesman (salesman_id, name, city, commission) values (5003, 'Lauson Hen', 'San Jose', 0.12); Create table Customer (customer_id int primary key, cust_name varchar(30), city varchar(10), grade varchar(30), salesman_id int,CONSTRAINT FK_salesman_id FOREIGN KEY (salesman_id) REFERENCES salesman(salesman_id));insert into customer…create database GA2gouse GA2gocreate table salesman(salesman_id int primary key, name varchar(30), city varchar(20), commission varchar(30));insert into salesman (salesman_id, name, city, commission) values (5001, 'James Hoog', 'New York', 0.15); insert into salesman (salesman_id, name, city, commission) values (5002, 'Nail Knite', 'Paris', 0.13); insert into salesman (salesman_id, name, city, commission) values (5005, 'Pit Alex', 'London', 0.11); insert into salesman (salesman_id, name, city, commission) values (5006, 'Mc Lyon', 'Paris', 0.14); insert into salesman (salesman_id, name, city, commission) values (5007, 'Paul Adam', 'Rome', 0.13); insert into salesman (salesman_id, name, city, commission) values (5003, 'Lauson Hen', 'San Jose', 0.12); Create table Customer (customer_id int primary key, cust_name varchar(30), city varchar(10), grade varchar(30), salesman_id int,CONSTRAINT FK_salesman_id FOREIGN KEY (salesman_id) REFERENCES salesman(salesman_id));insert into customer…