This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Numeric Data Types”.
1. Which of these is not an exact numeric type?
Explanation: MySQL supports all the standard SQL numeric data types. These are the exact numeric data types like INTEGER, SMALLINT, DECIMAL and NUMERIC and the approximate numeric data types like FLOAT, REAL and DOUBLE PRECISION.
2. How many of the following do not support ‘BIT’ data type?
MyISAM, MEMORY, NDB
Explanation: The BIT data type stores the bit values. It is supported for the MyISAM, MEMORY, InnoDB and NDB tables. MySQL supports all the standard SQL numeric data types, both the exact and approximate.
3. The statement that suspends the replication related activity of the slave server is _____________
a) RESUME SLAVE
b) START SLAVE
c) STOP SLAVE
d) GET SLAVE
Explanation: The ‘STOP SLAVE’ and ‘START SLAVE’ statements suspend and resume the replication-related activity of a slave server. These statements are useful for telling the slave to be quiescent.
4. The minimum value stored by signed TINYINT is _____________
Explanation: MySQL supports the SQL standard integer types INTEGER, or INT, and SMALLINT. As an extension to this standard, MySQL also supports the integer types TINYINT, MEDIUMINT and BIGINT.
5. MySQL uses security based on ACL. What does it stand for?
a) Access Control Language
b) Access Control Lists
c) Automatic Control Lists
d) Automatic Control Language
Explanation: MySQL uses security based on Access Control Lists (ACLs) for all connections, queries and other operations that users can attempt to perform. There is support for SSL encrypted connections.
6. On Unix, ‘mysql’ client writes a record of executed statements to a history file.
Explanation: On Unix the mysql client writes a record of the executed statements to a history file. By default this file is named as ‘.mysql_history’. It is created in the home directory.
7. A password applies locally to an account.
Explanation: In the MySQL privilege system, a password applies globally to an account. A password cannot be explicitly associated with a specific object such as a database, table, or routine.
8. If $a represents an array with numeric indices in PHP, the first element accessed by ______________
Explanation: If $a represents an array with numeric indices, its elements are accessed as $x, $x, and so on. In general terms, each element at the position i is accessed and used as $a[i – 1].
9. Arrays can have associative indices in PHP.
Explanation: The PHP arrays can even have both numeric and associative elements. For example, $x and $x[“large”] can both be the elements of the same array. $x can be an object, whose elements are accessed by the arrow ‘->’ operated.
10. The operator used in PHP to access property of an object is ________________
Explanation: If $a represents an object, the properties it has can be accessed as $a->property-name. For instance, $a->white, $a->black, $a->blue, $a->red can be the properties of $a and accessed in this way.
Sanfoundry Global Education & Learning Series – MySQL Database.
To practice all areas of MySQL Database, here is complete set of 1000+ Multiple Choice Questions and Answers.