Page 65 - IP
P. 65

(c)   [When "Calculate Net Amount" (jButton2) is clicked]
                                To calculate net amount as [TotalCost(jTextField2)]-
                                offer(jTextField3)

                                -Additional offer (jT extField4)]
                                To display the net amount in jTextField5

               Q5  (a)   What is the purpose of DROP TABLE command in MySql ? How is it
                           different from DELETE command?                                                   2

                     (b)  Table Employee has 4 records and Table Dept has 3 records in it. Mr. Jain
                           wants to display all information stored in both of these related tables. He
                           forgot to specify equi-join condition in the query. How many rows will get
                           displayed on execution of this query?                                            1

                     (c)   Consider  the  table  RESULT  given  below  Write  commands  in
                           MySql for (i) to (iv) and output for (v) to (vii) :

                                                    Table: Result
                              No  Name        Stipend    Subjet        Average    Division

                              1   Sharon        400      English          38      THIRD
                                                         Mathematic
                              2   Amal          680      s                72      FIRST

                              3   Vedant        500      Accounts         67      FIRST

                              4   Shakeer       200      Informatics      55      SECOND

                              5   Anandha       400      History          85      FIRST

                              6   Upasna        550      Geography        45      THIRD




                     (i)   To list the names of those students, who have obtained Division as FIRST in
                           the ascending order of NAME.                                                     1

                     (ii)   To display a report listing NAME, SUBJECT and Annual stipend received
                           assuming that the stipend column has monthly stipend.                            1
                           To count the number of students, who have either Accounts or
                     (iii)  Informatics as
                           Subject.                                                                         1

                     (iv)  To  insert  a  new  row  in  the  table

                           EXAM:  6,  "Mohan",  500,  "English",

                                                              6
   60   61   62   63   64   65   66   67   68   69   70