Mysql Query Optimization


  1. Which line of the following statements will produce error?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: E

    None of these


  1. Which Key is used to link two tables in Mysql?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    Foreign Key is only the Key which can link two tables.



  1. Find the error
    CREATE TABLE Employee
    (Employee_id SMALLINT, name VARCHAR, LAST VARCHAR, Bith_date DATE
    CONSTRAINTS pk_Employee PRIMARY KEY (Employee_id));
    INSERT INTO Employee
    VALUES(Employee_id, name, LAST, Birth_date)
    (1,’s’,’p’, 24-1991-01);











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    Format for DATE datatype is YYYY-MM-DD.


  1. Find the error?
    CREATE TABLE Employee
    ( Employee_id SMALLINT, name VARCHAR, LAST VARCHAR
    CONSTRAINTS pk_Employee PRIMARY KEY (Employee_id));
    INSERT INTO Employee
    VALUES( Employee_id, name, LAST)
    (1, ’s’, ’p’);
    INSERT INTO person
    ( Employee_id, name, LAST)
    VALUES(1,’s’,’p’);











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    Primary can never have same value.



  1. Which of the following are the valid “database datatypes” in Mysql?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    Temporal, Text and Numerical are the valid “database datatypes” in Mysql.