Page 34 - Modular_V2.0_SQL_Flipbook
P. 34

Recap



                        After creating a table, you can insert records into it by using the INSERT command.
                        The SELECT command retrieves zero or more rows from a table.
                        The DELETE command is used to remove records from a table.

                        UPDATE command is used to change the data inserted into a table.
                        The DISTINCT clause is used with the SELECT command to display the unique values of a column.
                        The SELECT command is the most useful DML command.




                                                       Exercise



              A.   Tick ( ) the correct option.

                 1.  Which operator reverses the value of any other Boolean operator?
                    a.  ALL                                          b.  IN

                    c.  NOT                                          d.  AND
                 2.  Which of the following does not fall under the relational operators?
                    a.  <,<=                                         b.  >,>=

                    c.  <,>                                          d.  AND, OR
                 3.  Which of the following operator is used when all conditions need to be satisfied?
                    a.  Logical and                                  b.  Relational <>

                    c.  Arithmetic                                   d.  None of these
                 4.  Which of the following is the way of using the delete command?

                    a.  Without WHERE clause                         b.  With the WHERE clause
                    c.  Both a and b                                 d.  None of these
                 5.  The wildcard characters used in LIKE operator are …………………… and …………………… .

                    a.  (_), *                                       b.  %, *
                    c.  (_), %                                       d.  _ , %

              B.  Fill in the blanks using the words given below:


                                                       Distinct, Insert, Select, %, TRUE


                 1.  After creating a table, you can insert records into it by using the …………………… command.

                 2.  The …………………… command retrieves zero or more rows from a table.
                 3.  The …………………… wildcard denotes the multiple characters.

                 4.  The …………………… clause is used with the SELECT command to display the unique values a column.

                 5.  The EXISTS operator returns …………………… if the subquery returns one or more records.



                32
                      Touchpad MODULAR (Ver. 2.0)
   29   30   31   32   33   34   35   36   37   38   39