Page 24 - Modular_V2.0_SQL_Flipbook
P. 24

Recap


                        MySQL is an open-source RDBMS software which is available free of cost.
                        The CREATE DATABASE command is used to create a database in MySQL.

                        The CREATE TABLE command is used to create a table in SQL.
                        SQL constraints are used to define the rules for table data.
                        Modifying a table means making a change in the base structure of the table.
                        The DROP TABLE command is used to delete a table from a database.



                                                       Exercise




              A.   Tick ( ) the correct option.
                  1.  Which SQL command is used to create a new table in MySQL?

                    a.  FORM TABLE                                   b.  MAKE TABLE

                    c.  EXECUTE TABLE                                d.  CREATE TABLE
                  2.  Which of the following data types is used to include decimal numbers?

                    a.  Integer                                      b.  Float
                    c.  Date                                         d.  Bool
                  3.  The …………………… constraint restricts the value range that can be placed in a column.

                    a.  DEFAULT                                      b.  UNIQUE

                    c.  CHECK                                        d.  None of these
                  4.  Which of the following clause is used to delete column?

                    a.  REMOVE COLUMN                                b.  DROP COLUMN
                    c.  DELETE COLUMN                                d.  ERASE COLUMN
                  5.  Which of the following data types is used to include character string with variable length of n?

                    a.  CHARACTER (n)                                b.  VARCHAR (n)

                    c.  FLOAT( p)                                    d.  None of these
              B.  Fill in the blanks using the words given below:



                                                  Table, One, Modifying, Constraints, DESC


                  1.  The …………………… command describes the structure of the table.

                  2.  …………………… is also known as a relation.
                  3.  A table can only have …………………… primary key.

                  4.  …………………… a table means making a change in the base structure of the table.

                  5.  …………………… are used to restrict the types of data that can be entered into a table.


                22
                      Touchpad MODULAR (Ver. 2.0)
   19   20   21   22   23   24   25   26   27   28   29