1. SQL (50 pts) Orders Order OrdeDate Statu Products Stores Order Repion Super 1
ID: 3732995 • Letter: 1
Question
1. SQL (50 pts) Orders Order OrdeDate Statu Products Stores Order Repion Super 1001 3/1/2014 Cosed 28 101 10 1002 3/1/2014 Cosed 28 101 8 1003 3/1/2014 Open 28 102 50 1004 3/2/2014 Cancelled 32 102 70 1005 3/2/2014 Open 20 101 80 1006 3/5/2014Open 20 1028 1007 3/5/2014 Cancelled 29 104 2 1008 3/5/2014 Open 32 103 3 20 28 LA 29 LA 30 SD 31 OC 32 L 33 S 101 Pen 102 Penl 1200 103 Bax 104 Bindercip 800 500 100 The above data are for reference only. Actual tables have a lot more data. * 1. Write an SQL command to ADD a new column to the STORES table. The column name is OrderStatus and data type is varchar2(10)./ SQL> * 1 am making all stores active sQL> update Stores set Status- 'Active' * 2. We have just introduced a new product: P# is 105 and PName is Paperclip. We do not have the inventory level yet so leave it blank. Please write a SOL statement to reflect this change to the database. SOTs SQL> commit: 3. We are phasing out our 'SD' stores. Please write an SOL to make all SD' stores status "Inactive SQLS 4. We just learmned that the inventory level of pli 10s is 1000. Please write an SQL.command to add this information to the database. SOL> SQL> rollback *5. Write the screen output after the following command; please consider ALL previous SOL. commands. sot> select from stores where region SD page 2 of 7Explanation / Answer
Please find the answer
if you have any query please let me know
=============================================================
// add a new column to the table stores
// these sql query are user to add new column with column name OrderStatus and datatype varchar2(10)
1-
ALTER TABLE Stores ADD OrderStatus varchar2(10);
// to insert a new product where P# is 105 and Pname is Paperclip into a Products table
// here p# is the column name which you have provide or given in table like this -> ProductId
2-
INSERT INTO Products(P#,Pname) values(105,'Paperclip');
//Sql to make all SD stores status inactive
// these sql are use to change the status to Inactive where region is SD
3-
UPDATE Stores SET Status='Inactive' where Region='SD';
// Inventory level of p# 105 is 1000
// these sql query are for Insert the inventory data of of productId is 105
// here p# is the column name which you have provide or given in table like this -> ProductId
4-
Update Products set Inventory=1000 where P#=105
================================================================
According to chegg rule we can give only four parts of the answer.
if you have any query please let me know
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.