Data Types


  1. AUTO_INCREMENT columns must be NOT NULL.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    The ‘AUTO_INCREMENT’ columns must be NOT NULL. If the NOT NULL is omitted, MySQL adds it automatically. AUTO_INCREMENT column values begin with 1 and increase monotonically after it.


  1. Which of these values is not valid as an AUTO_INCREMENT value?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    In MySQL, the ‘AUTO_INCREMENT’ values are a sequence of unique values assigned to the columns such that they increase monotonically. They begin with the value 1 and increment by a unit.



  1. INT3 maps to MySQL type _____________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    In order to facilitate the use of the code written for SQL implementations (reusability of code) from other vendors, MySQL maps the data types from the other vendor types to the appropriate MySQL type.


  1. Calculations involving numbers are faster than those involving string.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    Numbers can be compared in a single operation while string comparisons involve several byte by byte or character by character comparisons. As the strings become longer, the performance gets poor.



  1. If a column is expected to store values up to 2 million, the best datatype for it is _____________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    The different numeric types used in MySQL are used to store different range of values. To store values of the order of a million, the MEDIUMINT or BIGINT datatype is sufficient.