Explore topic-wise MCQs in Mysql.

This section includes 25 Mcqs, each offering curated multiple-choice questions to sharpen your Mysql knowledge and support exam preparation. Choose a topic below to get started.

1.

Stored programs refer to stored objects of how many of the following types?
functions, procedures, triggers, events

A. 4
B. 3
C. 2
D. 1
E. None of these
Answer» B. 3
2.

How many of the following is considered as a special character by mysql_real_escape_string() ?
null byte, single quote, backslash

A. 3
B. 2
C. 1
D. 0
E. None of these
Answer» B. 2
3.

Which of these has lower memory requirement?
mysql_use_result(), mysql_store_result()

A. same
B. machine dependent
C. mysql_use_result()
D. mysql_store_result()
E. None of these
Answer» D. mysql_store_result()
4.

How many of the following take a connection handler as argument?
mysql_store_result(), mysql_use_result()

A. 3
B. 2
C. 1
D. 0
E. None of these
Answer» C. 1
5.

The number of attributes in the following table is ______________.
CREATE TABLE Student (
Stu_name CHAR(30),
Stu_id INT
);

A. 30
B. 3
C. 2
D. 1
E. None of these
Answer» D. 1
6.

To how many of the following does the prepared-statement API apply to?
CREATE TABLE, DELETE, DO, INSERT

A. 4
B. 3
C. 2
D. 1
E. None of these
Answer» B. 3
7.

How many of the following return rows?
SELECT, SHOW, DESCRIBE

A. 3
B. 2
C. 1
D. 0
E. None of these
Answer» B. 2
8.

Which of these is more restrictive?
mysql_query(), mysql_real_query()

A. same
B. machine dependent
C. mysql_query()
D. mysql_real_query()
E. None of these
Answer» D. mysql_real_query()
9.

The default case sensitivity of the database and table names depends on ___________.

A. SQL server
B. Does not depend on anything
C. Server SQL mode
D. Operating system of machine
E. None of these
Answer» E. None of these
10.

Which statement is valid if `sampledb` is a database and `tbl` is a table in it?

A. SELECT * FROM `member.sampledb`
B. SELECT * FROM `sampledb.member`
C. SELECT * FROM `sampledb`.`member`
D. SELECT * FROM `member`.`sampledb`
E. None of these
Answer» D. SELECT * FROM `member`.`sampledb`
11.

mysql_fetch_row() returns _______________.

A. pointer
B. structure
C. float
D. integer
E. None of these
Answer» B. structure
12.

For failure, mysql_query() returns _______________.

A. -1
B. a non-zero
C. 1
D. 0
E. None of these
Answer» C. 1
13.

The general statement-issuing routine is _______________.

A. mysql_query_image()
B. mysql_image_query()
C. mysql_query_real()
D. mysql_real_query()
E. None of these
Answer» E. None of these
14.

How many of the following is considered as a special character by mysql_real_escape_string() ?

A. 3
B. 2
C. 1
D. 0
E. None of these
Answer» B. 2
15.

A synonym for CHARACTER SET is ______________.

A. CHCSET
B. CSET
C. CHSET
D. CHARSET
E. None of these
Answer» E. None of these
16.

The maximum collations a character set can have is ______________.

A. 2
B. more than 1
C. 1
D. 0
E. None of these
Answer» C. 1
17.

The number of attributes in the following table is ______________.

A. 30
B. 3
C. 2
D. 1
E. None of these
Answer» D. 1
18.

The statement used to change the table name is __________.

A. CHANGENM
B. CHANGENAME
C. CHANGE
D. RENAME
E. None of these
Answer» E. None of these
19.

The statement used to remove indexes on tables is ______________.

A. DELETE INDEX
B. FLUSH INDEX
C. DROP INDEX
D. REMOVE INDEX
E. None of these
Answer» D. REMOVE INDEX
20.

The statement that constructs a branching flow-control construct is _____________.

A. ITERATE
B. BEGIN END
C. LEAVE
D. CASE
E. None of these
Answer» E. None of these
21.

Which of these has lower memory requirement?

A. same
B. machine dependent
C. mysql_use_result()
D. mysql_store_result()
E. None of these
Answer» D. mysql_store_result()
22.

Association between one or more MyISAM tables and the named key cache is set by _____________.

A. ALTER DATABASE
B. ALTER EVENT
C. CACHE INDEX
D. BEGIN
E. None of these
Answer» D. BEGIN
23.

The statement used to select a default database is ______________.

A. DROP
B. SCHEMA
C. USE
D. CREATE
E. None of these
Answer» D. CREATE
24.

The statement that makes changes to the global attributes of the database is ______________.

A. UPDATE
B. ALTERNATE
C. CHANGE
D. ALTER
E. None of these
Answer» E. None of these
25.

How many of the following take a connection handler as argument?

A. 3
B. 2
C. 1
D. 0
E. None of these
Answer» C. 1