SQL MCQ Quiz Hub

SQL MCQ SET 14

Choose a topic to test your knowledge and improve your SQL skills

The maximum length of the varchar columns is ____________





✅ Correct Answer: 1

In oracle database variable length column is declared by ____________





✅ Correct Answer: 3

Mysql support different character sets, which command is used to display all character sets?





✅ Correct Answer: 1

Which one is the correct declaration for choosing the character set other than default?





✅ Correct Answer: 1

Which “text type” has the maximum number of bytes?





✅ Correct Answer: 4

Which among the following have the maximum bytes?





✅ Correct Answer: 3

What will happen if the data being loaded into a text column exceeds the maximum size of that type?





✅ Correct Answer: 3

Which data type is more suitable for storing “small notes” in Mysql?





✅ Correct Answer: 3

Which data type is more suitable for storing “documents” in Mysql?





✅ Correct Answer: 2

“Numeric Data” is used to store ____________





✅ Correct Answer: 4

Which Numeric Data type has the largest range?





✅ Correct Answer: 3

What will be the storage pattern for “float(4,2)” in Mysql?





✅ Correct Answer: 1

Which among the following are the correct representation of “float(4,2)”?





✅ Correct Answer: 4

Which among the following is the correct representation of “float(5,0)”?





✅ Correct Answer: 3

Which among the following is the correct representation of “float(1,1)”?





✅ Correct Answer: 1

Which data type is used to store data and time in Mysql?





✅ Correct Answer: 3

What is the default format for “Date” data type?





✅ Correct Answer: 1

What is the default format for “Datetime” data type?





✅ Correct Answer: 1

What is the default format for “Timestamp” data type?





✅ Correct Answer: 1

What is the default format for “Year” data type?





✅ Correct Answer: 1

What is the default format for “Time” data type?





✅ Correct Answer: 1

Is “Datetime” and “Timestamp” are same data type?





✅ Correct Answer: 1

Which value will show an error when stored in float(4,2)?





✅ Correct Answer: 4

The datatype for single precision floating point number is ____________





✅ Correct Answer: 1

Which datatype is used for a fixed length binary string?





✅ Correct Answer: 2

Which datatype means a variable length non binary string?





✅ Correct Answer: 1

Which data and time datatype stores time value in ‘hh:mm:ss’ format?





✅ Correct Answer: 2

Which spatial datatype is used to store a curve?





✅ Correct Answer: 3

The datatype INT stores ___________





✅ Correct Answer: 2

The datatype SMALLINT stores ___________





✅ Correct Answer: 1

The storage size in bytes required for the MEDIUMINT datatype is ___________





✅ Correct Answer: 3

The storage size in bytes required for the MEDIUMINT datatype is ___________





✅ Correct Answer: 4

The REAL type is synonym for ___________





✅ Correct Answer: 3

The maximum number of elements allowed in SET() is ___________





✅ Correct Answer: 3

The maximum size in bytes of a row in MySQL is __________





✅ Correct Answer: 2

For which type are illegal values converted to the appropriate ‘zero’ value?





✅ Correct Answer: 4

What is the command to see the warning messages?





✅ Correct Answer: 4

The SQL mode to check for divide by zero error is ________________





✅ Correct Answer: 2

Which mode is used to turn on strict mode and all of the additional restrictions?





✅ Correct Answer: 3

Which mode is a shorthand for ‘both strict modes plus a bunch of other restrictions’?





✅ Correct Answer: 3

Which mode prevents MySQL to perform full checking of date parts?





✅ Correct Answer: 2

Which keyword suppresses errors?





✅ Correct Answer: 4

Which mode prevents entry of the ‘zero’ date value in strict mode?





✅ Correct Answer: 2

Which column attribute provides unique numbers for identification?





✅ Correct Answer: 1

The AUTO_INCREMENT sequences normally begin at __________





✅ Correct Answer: 2

The value of recently generated sequence number can be obtained by ____________





✅ Correct Answer: 1

When no AUTO_INCREMENT value has been generated during the current connection, LAST_INSERT_ID() returns ____________





✅ Correct Answer: 2

Suppose the last row has the AUTO_INCREMENT column value 32. Suppose a new row is added by setting AUTO_INCREMENT value equal to 100. The next row added will have value _____________





✅ Correct Answer: 4

The number of rows in the table is 10. Suppose all rows are deleted. The new row starts with sequence number ____________





✅ Correct Answer: 2

In a MyISAM table, if the maximum value of an AUTO_INCREMENT increment column is 12 and that row is deleted, the next value generated is _____________





✅ Correct Answer: 2

In MyISAM tables, when a table is emptied with the TRUNCATE TABLE, the counter begins at _____________





✅ Correct Answer: 2