Wednesday, January 20, 2010

MySQL Quiz Questions and Answers

Find below MCQ (Multiple Choice) questions and Answers useful for learning MySQL.

We are working on to publish more questions in many topics (e.g CSS,QTP,aptidude...). We have already published questions and answers for learning software testing, javascript, HTML and php.

So, you can bookmark this blog for further reading, or you can subscribe to our blog feed.

If you find any issue in any question you can mention thro' comment section or send mail to

You can put the below HTML code in your blog or website for linking into this page.

1) MySQL runs on which operating systems?
a) Linux and Mac OS-X only
b) Any operating system at all
c) Unix, Linux, Windows and others
d) Unix and Linux only
Show Answer

2) To remove duplicate rows from the result set of a SELECT use the following keyword:
d) None of the above
Show Answer

3) Which of the following can add a row to a table?
a) Add
b) Insert
c) Update
d) Alter
Show Answer

4) To use MySQL on your computer, you'll need?
a) FTP and Telnet
b) Some sort of client program to access the databases
c) A Browser
d) Perl, PHP or Java
Show Answer

5) Which SQL statement is used to insert a new data in a database?
c) ADD
Show Answer

6) In a LIKE clause, you can could ask for any value ending in "qpt" by writing
a) LIKE %qpt
b) LIKE *ton
c) LIKE ton$
d) LIKE ^.*ton$
Show Answer

7) A NULL value is treated as a blank or 0.
a) True
b) Fasle
c) None of the above
Show Answer

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

9) In a LIKE clause, you can ask for any 6 letter value by writing?
a) LIKE ??????
b) LIKE .{6} Answer 5: LIKE ^.{6}$
c) LIKE ...... (that's six dots)
d) LIKE ______ (that's six underscore characters)
Show Answer

10) The result of a SELECT statement can contain duplicate rows.
a) False
b) True
c) None of the above
Show Answer

11) Which function used to get the current time in mysql?
a) getTime()
b) Time()
c) NOW()
Show Answer

12) A table may be joined to itself.
a) True
b) false
c) None of the above
Show Answer

13) Which of the following is not a valid aggregate function?
b) MIN
c) MAX
Show Answer

14) mysql_pconnect()
is used to make a persistent connection to the database which means a SQL link that do not close when the execution of your script ends.
a) True
b) False
Show Answer

15) What SQL clause is used to restrict the rows returned by a query?
a) AND
Show Answer

16) 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
Show Answer

17) MySQL supports the complete SQL99 standard
a) false
b) true
Show Answer

18) Primary Key does allow the Null Values. where as in
Unique key doesn't accept the Null values.
True or False ?
a) False
b) True
Show Answer

19)How much character are allowed to create database name?
a) 55
b) 72
c) 64
d) 40
Show Answer

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

21) Which one will delete the table data as well as table structure?
Show Answer

22) The USE command?
a) Is used to load code from another file
b) Has been deprecated and should be avoided for security reasons
c) Is a pseudonym for the SELECT command
d) Should be used to choose the database you want to use once you've connected to MySQL
Show Answer

23) Given an employees table as follows:
emp_id emp_name
1 Brush
2 Jerrin
what value will be return by below query ?
Select count(*) from employees
a) 3
b) 2
c) 1
d) none of the above
Show Answer

24) The main MySQL program that does all the data handling is called?
a) mysql.exe
b) mysql
c) mysqld
d) httpd
Show Answer

25) A SELECT command without a WHERE clause returns?
a) All the records from a table that match the previous WHERE clause
b) All the records from a table, or information about all the records
c) SELECT is invalid without a WHERE clause
d) Nothing
Show Answer

26) MySQL Access security is controlled through?
a) The ID that the user logged into the server through, and priveliges set up for that account.
b) MySQL login accounts, and priveliges set for each account
c) The normal login security is sufficient for MySQL, and it does not have any extra controls of its own.
d) A table of valid IP addresses, and priveliges set up for each IP address
Show Answer

27) In a SELECT with a GROUP BY clause, a WHERE clause, and a HAVING clause, the WHERE conditions are applied before the HAVING conditions.
a) True
b) Fasle
c) Either True or False
d) None of the above
Show Answer


(1) c (2) c (3) b (4) b (5) a (6) a (7) b (8) d (9) d (10) b
(11) c (12) a (13) d (14) a (15) b (16) c (17) a (18) a (19) c (20) b
(21) b (22) d (23) b (24) c (25) b (26) b (27) a

SQL for Beginners. Learn basics of SQL in 1 Hour

No comments:

Search This Blog