Page 14 - C++
P. 14

SECTION – C

        Q5     (a)   Differentiate  between  DDL  &  DML.  Identify  DDL  &  DML  commands  from  the              2
                     following:-

                                   (UPDATE, SELECT, ALTER, DROP)

               (b)   Consider the following relation MobileMaster & MobileStock:-                                  6
                                                         MobileMaster

                              M_Id        M_Company        M_Name           M_Price       M_Mf_Date

                            MB001          Samsung          Galaxy           4500         2013-02-12

                            MB003            Nokia           N1100           2250         2011-04-15
                            MB004          Micromax          Unite3          4500         2016-10-17

                            MB005             Sony         XperiaM           7500         2017-11-20

                            MB006            Oppo           SelfieEx         8500         2010-08-21


                                                          MobileStock

                               S_Id              M_Id              M_Qty              M_Supplier

                              S001              MB004                450              New Vision

                              S002              MB003                250            Praveen Gallery
                              S003              MB001                300          Classic Mobile Store

                              S004              MB006                150             A-one Mobiles

                              S005              MB003                150              The Mobile

                              S006              MB006                50              Mobile Centre


                     Write the SQL query for questions from (i) to (iv) & write the output of SQL command

                     for questions from (v) to (viii) given below:-
                         (i)    Display  the  Mobile  company,  name  &  price  in  descending  order  of  their



                                                       Page No. 12
   9   10   11   12   13   14   15   16   17   18   19