SQL MCQ Quiz Hub

SQL MCQ SET 14

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

1. The maximum length of the varchar columns is ____________




2. In oracle database variable length column is declared by ____________




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




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




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




6. Which among the following have the maximum bytes?




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




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




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




10. “Numeric Data” is used to store ____________




11. Which Numeric Data type has the largest range?




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




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




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




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




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




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




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




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




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




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




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




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




24. The datatype for single precision floating point number is ____________




25. Which datatype is used for a fixed length binary string?




26. Which datatype means a variable length non binary string?




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




28. Which spatial datatype is used to store a curve?




29. The datatype INT stores ___________




30. The datatype SMALLINT stores ___________




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




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




33. The REAL type is synonym for ___________




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




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




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




37. What is the command to see the warning messages?




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




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




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




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




42. Which keyword suppresses errors?




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




44. Which column attribute provides unique numbers for identification?




45. The AUTO_INCREMENT sequences normally begin at __________




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




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




48. 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 _____________




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




50. 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 _____________




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