BITS Corporation Exercises 14-16
14. Create a new table named Sept21 to contain the columns OrderNum, TaskID, Description, ScheduleDate, QuotePrice for all rows on which the ScheduledDate is 9/21/2018
15. In the Sept 21 table, change the description of TaskID PI54 to “Misc. Printing”
16. In the Sept21 table, add a new order. The order number is 69123. The TaskID is OT99. The scheduled date is 9/21/2018. The quoted price is $99. The description is Other work.
//Incase the table needs to be created for the first time
14. CREATE TABLE Sept21(
OrderNum NUMBER(10),
TaskID NUMBER(4),
Description VARCHAR(100),
ScheduleDate DATE,
QuotePrice NUMBER(7,2) );
//incase the table is created using the "select" statement from the existing table say "ORDERS"
14. CREATE TABLE Sept21
AS
SELECT OrderNum, TaskID, Description, ScheduleDate, QuotePrice FROM ORDERS
WHERE ScheduleDate = TO_DATE('21-SEP-18", "DD-MON-YY");
15. UPDATE Sept21
SET DESCRIPTION = "Misc. Printing"
WHERE TaskID="PI54";
16. INSERT INTO Sept21
( 69123 , OT99 , "Other Work", "21-SEP-18", 99 );
Get Answers For Free
Most questions answered within 1 hours.