Dev

Wednesday, 29 October 2014

MySQL MCQs

Name:
Set 2| Time: 20 min                        
MySQL

1) Which commend/function is used to list table information in a database:
a. Show tables;             b. Mysql_list_tables ();
c. List tables;                d. Mysql_show_tables ();

2) MySQL is
a) A Programming language       b) A Programming language
c) A technique for writing reliable programs
d) A Relational Database Management System

3) Which of the following commands should be used to create a database named “student”?
a) CREATE? I student                b) CREATE DATABASE student
c) DATABASE /student              d) DATABSE student

4) How much storage space does DATETIME require?
a.    4 bytes                          b.     2 bytes
c.    8 bytes                          d.    1 bytes

5) Which of these field types would be best to hold a .jpg image?
a) blob      b) text              c) nchar binary                  d) char binary

6) Which SQL statement is used to insert new data in a database?
                 a) INSERT NEW                 b) INSERT INTO
                 c) ADD NEW                      d) ADD ROW

7) Which Numeric Data type has the largest range?
             a. Mediumint    b. Smallint        c. Int                 d. Tinyint

8) Which of the following ways below are the correct way to get the current date?
a.    SELECT CURTIME();                       b.     SELECT CURDATE();
c.    SLELCT CURRRENT_TIME()            d.    All of the above

9) What is the default format for “Datetime” data type?
a. YYYY-MM-DD HH:MM:SS     b. MM-YYYY-DD HH:MM:SS
c. DD-YYYY-MM MI:HH:SS       d. None of these

10) The number of indexes allowed per table in MYSQL are:
                a. 16                       b. 32                      c. 64                       d. 84

11) Mysql supports both signed and unsigned data types.
                a) True                                  b) False

13) Create a database named FruitDB and create table tbl_fruit in that    database as follows (Use appropriate data type).Also insert any 2 values.
Fruit_id, name, color, cost                                                             - 4 marks



1 comment: