MySQL MCQ's Set-1






 1. To use MySQL on your computer, you’ll need

     A. Perl, PHP or Java

     B. Some sort of client program to access the databases

     C. A Browser

     D. FTP and Telnet

ANSWER: B


2. What kind of replication is supported by the MySQL server?

    A. Multiple-master replication

    B. Master to slave replication

    C. Single file based clustering

    D. MySQL doesn’t support replication

ANSWER: B


3. Commands passed to the MySQL daemon are written in

    A. Your choice from Perl, PHP, Java or some other languages

    B. English

    C. the Structured Query Language

    D. Swedish

ANSWER: C


4. Which of the following can add a row to a table?

    A. Alter

    B. Add

    C. Insert

    D. Create

    E. Update

ANSWER: C


5. Which of these commands will delete a table called XXX if you have appropriate authority:

    A. DROP XXX

    B. DELETE XXX WHERE confirm = “YES”

    C. DROP XXX WHERE confirm = “YES”

    D. DROP TABLE XXX

    E. DELETE XXX

    F. DELETE TABLE XXX

ANSWER: D


6.  In a LIKE clause, you can ask for any 6 letter value by writing:

    A. LIKE ??????

    B. LIKE .{6}

    C. LIKE ^.{6}$

    D. LIKE …… (that’s six dots)

    E. LIKE ______ (that’s six underscore characters)

ANSWER: E


7. Which of the following is NOT supported by MySQL

    A. Temporary (Hash) Tables

    B. Table Joining

    C. Stored Procedures

    D. Regular Expression Matching

ANSWER: C


8. Which of these is a valid call to a function (watch the spaces carefully!)

    A. CONCAT( A , B )

    B. CONCAT ( A , B )

    C. CONCAT( “A” , “B” )

    D. CONCAT ( “A” , “B” )

    E. CONCAT (A, B)

    F. CONCAT (“A”, “B”)

ANSWER: C


9.  If you want to undo a GRANT, you should use

    A. REVOKE

    B. UNDO

    C. UNGRANT

    D. DELETE

    E. WITHDRAW

    F. ROLLBACK

ANSWER A


10. How many distinct, different values can you hold in an enum field?

    A. 255

    B. 7

    C. 65535

    D. 2 (True and False)

ANSWER: C


11. Which of the following is NOT available in MySQL:

    A. REVOKE

    B. FETCH

    C. LIKE

    D. JOIN

    E. SELECT

ANSWER: B


12. Which of these field types would be best to hold a film title?

    A. longblob

    B. tinytext

    C. mediumtext

    D. longtext

    E. tinyblob

ANSWER: B


13. The program called mysql is

    A. There isn’t a program just called mysql

    B. A wrapper through which Java clients must connect to the databases

    C. A client program that lets you send SQL commands to the database engine

    D. The database engine

    E. A program that starts up and shuts down the database engine

ANSWER: C


14. In a LIKE clause, you can ask for any 6 letter value by writing:

    A. LIKE ______ (that’s six underscore characters)

    B. LIKE .{6}

    C. LIKE ??????

    D. LIKE ^.{6}$

    E. LIKE …… (that’s six dots)

ANSWER: A


15. Which of the following is available in MySQL:

    A. CREATE VIEW

    B. CREATE SCHEMA    

    C. CREATE TRIGGER

    D. CREATE DATABASE

    E. CREATE FAIRYLIGHTS

ANSWER: D


16. Which of these field types would be best to hold a .jpg image?

    A. char binary

    B. nchar binary

    C. text

    D. blob

ANSWER: D


17. Which of the following is available in MySQL:

    A. CREATE TRIGGER

    B. CREATE SCHEMA

    C. CREATE FAIRYLIGHTS

    D. CREATE DATABASE

    E. CREATE VIEW

ANSWER: D


18. To remove duplicate rows from the result set of a SELECT use the following keyword:

    a) NO DUPLICATE

    b) UNIQUE

    c) DISTINCT

    d) None of the above

ANSWER: c


19. Which of the following is used to delete an entire MYSQL database?

    a) mysql_drop_database

    b) mysql_drop_entiredb

    c) mysql_drop_db

    d) mysql_drop_dbase

ANSWER: c


20. Primary Key does allow the Null Values. where as in Unique key doesn’t accept the       Null  values.

      Question: True or False ?

      a) False

      b) True

ANSWER: a



                                                                                                                                                   
                                                                                                                               


Popular Posts