
plz quickly ??????????????
/*Inserting into patient table*/
INSERT INTO patient
VALUES ('1234','Kim Minji','06-05-1994','0557375017');
INSERT INTO patient
VALUES ('1334','Han Sohee','06-07-1996','0567374017');
INSERT INTO patient
VALUES ('1434','Jeon soyeon','07-10-1998','0537372017');
INSERT INTO patient
VALUES ('1646','Lee Taemin','18-06-1993','0501346257');
INSERT INTO patient
VALUES ('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 appointment VALUES (1, '12-08-21', '04:40',2000432,1234);
INSERT INTO appointment VALUES (2, '11-08-21', '06:00',2000509,1334);
INSERT INTO appointment VALUES (3, '04-09-21', '07:00',2000389,1434);
INSERT INTO appointment VALUES (4, '10-09-21', '01:46',2000504,1646);
INSERT INTO appointment VALUES (5, '17-10-21', '12:00',2000235,1645);
select *from appointment;
/*Inserting into drug table*/
insert into drug values(101,'Crocin',50);
insert into drug values(102,'Telmikind',130);
insert into drug values(104,'Combiflam',70);
insert into drug values(108,'Paracetamol',80);
insert into drug values(105,'Zocon',120);
select *from drug;
/*Prescription table*/
INSERT INTO prescription (pre_no,pre_date,pre_amount)
VALUES (10, '12-08-21', 100);
INSERT INTO prescription (pre_no,pre_date,pre_amount)
VALUES (11, '20-08-21', 150);
INSERT INTO prescription (pre_no,pre_date,pre_amount)
VALUES (12, '03-09-21', 200);
INSERT INTO prescription (pre_no,pre_date,pre_amount)
VALUES (15, '1-10-21', 250);
INSERT INTO prescription (pre_no,pre_date,pre_amount)
VALUES (16, '05-11-21', 350);
select *from prescription;
/*Receipt table*/
INSERT INTO receipt (r_no,r_date,r_time,pre_no,p_id)
VALUES (1, '12-08-21' ,'05:10' , 12, 1234);
INSERT INTO receipt (r_no,r_date,r_time,pre_no,p_id)
VALUES (4, '11-08-21', '06:30', 10, 1334);
INSERT INTO receipt (r_no,r_date,r_time,pre_no,p_id)
VALUES (5, '04-09-21', '07:30', 11, 1434);
INSERT INTO receipt (r_no,r_date,r_time,pre_no,p_id)
VALUES (9, '10-09-21 ', '02:06' , 15, 1646);
INSERT INTO receipt (r_no,r_date,r_time,pre_no,p_id)
VALUES (19, '17-10-21', '12:30', 16, 1645);
select *from receipt;
/*Prescription_drug table*/
INSERT INTO prescription_drug (drug_no,pre_no)
VALUES (101, 10);
INSERT INTO prescription_drug (drug_no,pre_no)
VALUES (102, 11);
INSERT INTO prescription_drug (drug_no,pre_no)
VALUES (104, 12);
INSERT INTO prescription_drug (drug_no,pre_no)
VALUES (108, 15);
INSERT INTO prescription_drug (drug_no,pre_no)
VALUES (105, 16);
select *from prescription_drug


Step by stepSolved in 2 steps

- Sales Database: Customers(custId, lastName, firstName, address, phone, creditLimit) Orders(ordNumber, itemNumber, qtyOrdered.) Items(itemNumber, itemName, price) For the Sales Database referenced above, write the SQL command to create the LineItem table, assuming the Orders table and items table already exist.arrow_forwardThe database contains a Horse table, with columns: ID integer, primary key Registered Name variable-length string. The database contains a Student table, with columns: • ID integer, primary key First Name - variable-length string LastName variable-length string Write a SQL Query to create a Schedule table, with columns: HorseID - integer with range 0 to 65535, not NULL • Student ID integer with range 0 to 65535 Lesson DateTime - date/time, not NULL (HorseID, Lesson DateTime) is the primary key Also, create the following foreign key constraints on Schedule columns: HorseID references Horse. When an ID is deleted from Horse matching Lesson Schedule rows are deleted. Student ID references Student. When an ID is deleted from Student, matching Student ID 's are set to NULL).arrow_forward//stored procedure create or replace procedure firstthree (my_seqid in varchar2) as cursor c1 is select sname, grade from student s join taken t on s.sid=t.sid where seqid=my_seqid order by grade desc; -- my_sname varchar2(40); my_sname student.sname%TYPE; -- my_grade number(2,1); my_grade taken.grade%TYPE; begin /* clear the my_tmp table */ delete from my_tmp; commit; open c1; for i in 1..3 loop fetch c1 into my_sname, my_grade; exit when c1%notfound; /* in case the number requested */ /* is more than the total */ /* number of enrolled students */ /* display the result */ dbms_output.put_line('name: ' || my_sname || ' ' || 'grade: ' || my_grade); /* put into temporary table */ insert into my_tmp values(my_sname, my_grade); commit; end loop; close c1; end; / -------------- //php <? $connection = oci_connect ("test", "test", "test"); if ($connection == false){ $e = oci_error();…arrow_forward
- Task 8: Create the UPDATE_INVOICE procedure to change the date of the invoice whose number is stored in I_INVOICE_NUM to the date currently found in I_INVOICE_DATE.arrow_forwardWrite a SELECT statement that returns all rows with salary, last name, street address and ZIP code (SALARY, LAST_NAME, STREET, ZIP_CODE) from the EMPLOYEE and ADDRESS tables, sorted by SALARY from largest to smallest. STREET and ZIP_CODE are in the ADDRESS table, while the other fields are in the EMPLOYEE table. The common key is EMPLOYEE_ID.arrow_forwardAccess Assignment Problem: JMS TechWizards is a local company that provides technical services to several small businesses in the area. The company currently keeps its technicians and clients’ records on papers. The manager requests you to create a database to store the technician and clients’ information. The following table contains the clients’ information. Client Number Client Name Street City State Postal Code Telephone Number Billed Paid Technician Number AM53 Ashton-Mills 216 Rivard Anderson TX 78077 512-555-4070 $315.50 $255.00 22 AR76 The Artshop 722 Fisher Liberty Corner TX 78080 254-555-0200 $535.00 $565.00 23 BE29 Bert's Supply 5752 Maumee Liberty Corner TX 78080 254-555-2024 $229.50 $0.00 23 DE76 D & E Grocery 464 Linnell Anderson TX 78077 512-555-6050 $485.70…arrow_forward
- how to insert the following: Insert Into Director Values(1,'Josh','Klemm',1) Insert Into Director Values(2,'Jeff','Bezos',10) Insert Into Director Values(1,'Elon','Musk',50) Insert Into Director Values(3,'Elon','Musk',500000) Insert Into Director Values(3,'Elon','Musk',5)arrow_forwardALTER SESSION SET NLS_DATE_FORMAT = 'MM/DD/YYYY'; /* JOB TABLE */ CREATE TABLE JOB ( JOB_CODE varchar2(3) PRIMARY KEY, JOB_DESCRIPTION varchar2(25), JOB_CHG_HOUR float(8), JOB_LAST_UPDATE date ); INSERT INTO JOB VALUES('500','Programmer', '35.75','11/20/2015'); INSERT INTO JOB VALUES('501','Systems Analyst', '96.75','11/20/2015'); INSERT INTO JOB VALUES('502','Database Designer', '125', '3/24/2016'); INSERT INTO JOB VALUES('503','Electrical Engineer', '84.5', '11/20/2015'); INSERT INTO JOB VALUES('504','Mechanical Engineer', '67.9', '11/20/2015'); INSERT INTO JOB VALUES('505','Civil Engineer', '55.78','11/20/2015'); INSERT INTO JOB VALUES('506','Clerical Support', '26.87','11/20/2016'); INSERT INTO JOB VALUES('507','DSS Analyst', '45.95','11/20/2015'); INSERT INTO JOB VALUES('508','Applications Designer','48.1', '3/24/2016'); INSERT INTO JOB VALUES('509','Bio Technician', '34.55','11/20/2015'); INSERT INTO JOB…arrow_forwardtable not copiedarrow_forward
- Q1. Write a SELECT statement that returns these columns from the Invoices table: The invoice _total column A column that uses the ROUND function to return the invoice_total column with 1 decimal digit A column that uses the ROUND function to return the invoice_total column with no decimal digits Q1. Write a SELECT statement that returns these columns from the Invoices table: • The invoice_total column • A column that uses the ROUND function to return the invoice_total column with 1 decimal digit • A column that uses the ROUND function to return the invoice_total column with no decimal digits invoice_total one digit 3813.33 3813.3 zero_digits 3813arrow_forward- Delete the employee who has the longest employment in the companyarrow_forwardWrite a stored procedure named updateUnitsOnOrder(). The updateUnitsOnOrder ()procedure should update the UnitsOnOrder field of those products that are discontinued. It should set the UnitsOnOrder field to 99 for those discontinued products. Hint: There is no need to use cursor processing for this stored procedure.arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY





