Explore topic-wise MCQs in Technical Programming.

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

51.

Which clause is used with an “aggregate functions”?

A. GROUP BY
B. SELECT
C. WHERE
D. Both GROUP BY and WHERE
Answer» B. SELECT
52.

If emp_id contain the following set {9, 7, 6, 4, 3, 1, 2}, what will be the output on execution of the following MySQL statement?

A. {1, 2, 3, 4, 6, 7, 9}
B. {2, 1, 4, 3, 7, 9, 6}
C. {9, 7, 6, 4, 3, 1, 2}
D. None of the mentioned
Answer» B. {2, 1, 4, 3, 7, 9, 6}
53.

What is the significance of “ORDER BY emp_id DESC” in the following MySQL command?

A. Data of emp_id will be sorted in descending order
B. Data of emp_id will be sorted in ascending order
C. Data of emp_id will be sorted in either ascending or descending order
D. All of the mentioned
Answer» B. Data of emp_id will be sorted in ascending order
54.

If emp_id contain the following set {1, 2, 3, 4, 1, 1}, what will be the output on execution of the following MySQL statement?

A. {1, 1, 1, 2, 3, 4}
B. {1, 2, 3, 4, 1, 1}
C. {1, 1, 2, 3, 4, 1}
D. None of the mentioned
Answer» B. {1, 2, 3, 4, 1, 1}
55.

What will be the order of sorting in the following MySQL statement?

A. Sorting {emp_id, emp_name}
B. Sorting {emp_name, emp_id}
C. Sorting (emp_id} but not emp_name
D. None of the mentioned
Answer» B. Sorting {emp_name, emp_id}
56.

What is the significance of “ORDER BY emp_id ASC” in the following MySQL command?

A. Data of emp_id will be sorted in descending order
B. Data of emp_id will be sorted in ascending order
C. Data of emp_id will be sorted in either ascending or descending order
D. All of the mentioned
Answer» C. Data of emp_id will be sorted in either ascending or descending order
57.

Which keyword is used for sorting the data in ascending order in Mysql?

A. DESC
B. ASC
C. ALTER
D. MODIFY
Answer» C. ALTER
58.

Keyword “ASC” and “DESC” cannot be used without which clause in Mysql?

A. ORDER BY
B. GROUP BY
C. SELECT
D. HAVING
Answer» B. GROUP BY
59.

If emp_id contain the following set {-1, -2, 2, 3, -3, 1}, what will be the output on execution of the following MySQL statement?

A. {-3, -2, -1, 1, 2, 3}
B. {-1, 1, -2, 2, -3, 3}
C. {1, 2, 3, -1, -2, -3}
D. None of the mentioned
Answer» B. {-1, 1, -2, 2, -3, 3}
60.

Which keyword is used for sorting the data in descending order in Mysql?

A. DESC
B. ASC
C. ALTER
D. MODIFY
Answer» B. ASC
61.

If emp_id contain the following set {1, 2, 2, 3, 3, 1}, what will be the output on execution of the following MySQL statement?

A. {1, 1, 2, 2, 3, 3}
B. {1, 2, 3, 3, 2, 1}
C. {2, 2, 1, 1, 3, 3}
D. None of the mentioned
Answer» B. {1, 2, 3, 3, 2, 1}
62.

What is the host name in the following MySQL command?

A. cobra.snake
B. cobra.snake.net
C. sampadam
D. cobra
Answer» C. sampadam
63.

What is ‘tamp’ in the following MySQL command?

A. user name
B. password
C. host name
D. table name
Answer» B. password
64.

What does ‘abc’ & ‘xyz’ specify in the following SQL statement?

A. table name and column specs
B. column specs and table name
C. table name and number of columns
D. table name and number of rows
Answer» B. column specs and table name
65.

What column names are displayed when this SQL command is executed?

A. suffixed with ‘name’
B. prefixed with ‘name’
C. suffixed with ‘%name’
D. prefixed with ‘%name’
Answer» B. prefixed with ‘name’
66.

In the following SQL code, InnoDB is __________

A. database name
B. table name
C. reference engine
D. storage engine
Answer» E.
67.

Identify the table name in the following SQL statement.

A. Student
B. Values
C. Kyle
D. M
Answer» B. Values
68.

What can be used in place of MYSQL_SERVER_VERSION?

A. LIBMYSQL_VERSION
B. LIBMYSQL_VERSION_ID
C. MYSQL_VERSION_ID
D. MYSQL_ID
Answer» B. LIBMYSQL_VERSION_ID
69.

To see the table structure, which of the following SQL commands is issued?

A. DESCRIBE tbl_name
B. VIEW tbl_name
C. SELECT TABLE tbl_name
D. SELECT tbl_name
Answer» B. VIEW tbl_name
70.

To execute the contents of a query file ‘exec.sql’ by feeding it to mysql, which command is used?

A. mysql exec.sql > sampdb
B. mysql sampdb < exec.sql
C. mysql exec.sql
D. mysql exec
Answer» C. mysql exec.sql
71.

Suppose you want to select a database named ‘sampledb’ as the default database. Which of the following commands do you use?

A. SELECT DATABASE()
B. SELECT DATABASE sampledb
C. USE DATABASE sampledb
D. USE sampledb
Answer» E.
72.

Which of the following options tells mysql to ask for entering the password?

A. -e
B. -p
C. -u
D. -h
Answer» C. -u
73.

What does ‘mysql_query()’ return on failure?

A. 0
B. 1
C. -1
D. a non-zero value
Answer» E.
74.

The file that can be used to execute multiple compile statements is _________________

A. makefile
B. dofile
C. putfile
D. pushfile
Answer» B. dofile
75.

What can be used interchangeably with MYSQL_VERSION_ID?

A. LIBMYSQL_VERSION
B. LIBMYSQL_VERSION_ID
C. MYSQL_VERSION_ID
D. MYSQL_ID
Answer» C. MYSQL_VERSION_ID
76.

Which operator is used to perform integer divisions in MySQL?

A. /
B. \
C. DIV
D. //
Answer» D. //
77.

SHOW DATABASES lists the databases in the server to which you are connected.

A. True
B. False
C. May be True or False
D. Can't say
Answer» B. False
78.

The option that is necessary to compile a C program having math functions is _____________

A. -lm
B. -ln
C. -lp
D. -lq
Answer» B. -ln
79.

Which statement can produce the same output as ‘SHOW COLUMNS’?

A. DESCRIBE
B. DISPLAY
C. SEE
D. GET
Answer» B. DISPLAY
80.

The query ‘SELECT NOW()’ shows the current _____________

A. table
B. time only
C. date only
D. date and time
Answer» E.
81.

Which of these is not a comment specifying construct?

A. #
B. /* */
C.
D. !#
Answer» E.
82.

The MySQL double dashed comment style is the same as the SQL standard.

A. True
B. False
C. May be True or False
D. Can't say
Answer» C. May be True or False
83.

What does comparing a known value with NULL result into?

A. zero
B. a positive value
C. a negative value
D.
Answer» E.
84.

What does mysql_init() return?

A. integer
B. float
C. structure
D. pointer to a structure
Answer» E.
85.

In UNIX, the name of the option file is __________

A. .my.cnf
B. .my.ini
C. .my.opt
D. .my.opc
Answer» B. .my.ini
86.

The NULL value also means ___________

A. value equal to zero
B. unknown value
C. negative values
D. a large value
Answer» C. negative values
87.

Which clause is used to sort query elements?

A. GROUP
B. GROUP BY
C. ORDER
D. ORDER BY
Answer» E.
88.

MySQL client runs on the machine containing the databases and servers connect to the client over a network.

A. True
B. False
C. May be True or False
D. Can't say
Answer» C. May be True or False
89.

On UNIX, statements entered in ‘MySQL’ are saved in which file?

A. .mysql_queries
B. .queries
C. .mysql_history
D. .history
Answer» D. .history
90.

When linking to a static MySQL C client library, the client library and the client application can use different compiler options.

A. True
B. False
C. May be True or False
D. Can't say
Answer» C. May be True or False
91.

Which option is used for specifying the executable name while compiling with gcc?

A. -e
B. -o
C. -a
D. -b
Answer» C. -a
92.

The clause that enables mapping a short command to a long command is __________

A. map
B. direct
C. label
D. alias
Answer» E.
93.

The connection parameters for setting up MySQL can be stored in an option file to save typing the names every time a connection is established.

A. True
B. False
C. May be True or False
D. Can't say
Answer» B. False
94.

The header that should be included first is ________________

A. my_global.h
B. my_sys.h
C. mysql.h
D. my_local.h
Answer» B. my_sys.h
95.

Which is the correct decreasing order for highly developed text manipulation capabilities?

A. Perl, PHP, C
B. Perl, C, PHP
C. PHP, Perl, C
D. C, PHP, Perl
Answer» B. Perl, C, PHP
96.

The static C library client in Windows is _____________

A. mysqlclient.lib
B. mysqlclient.lb
C. mysqlclient.lm
D. myclient.lib
Answer» B. mysqlclient.lb
97.

Foreign keys can handle deletes and updates.

A. True
B. False
C. May be True or False
D. Can't say
Answer» B. False
98.

The statement used to remove indexes on tables is ______________

A. DROP INDEX
B. DELETE INDEX
C. REMOVE INDEX
D. FLUSH INDEX
Answer» B. DELETE INDEX
99.

What does ‘abc’ || ‘xyz’ result in if the PIPES_AS_CONCAT is disabled?

A. 1
B. 0
C. error
D. -1
Answer» C. error
100.

Which API provides the lowest level interface to the server?

A. C API
B. Perl
C. PHP
D. Python
Answer» B. Perl