Home / CSE MCQs / MySQL Database MCQs :: MySQL Database Nulls and Conditions

CSE MCQs :: MySQL Database MCQs

  1. The following query belongs to which condition types?

    SELECT fname
    FROM person
    WHERE dept_id= (SELECT dept_id FROM department WHERE names='s');
  2. A.
    Equality condition
    B.
    Inequality condition
    C.
    Range condition
    D.
    All of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Is the following query belongs to the "Equality condition?

    SELECT product_type.name, product.name
    FROM product_type INNER JOIN Product
    ON product_type.dept=Product.dept
    WHERE product_type.name='customers_accounts';
  4. A.
    Yes
    B.
    No
    C.
    Depends
    D.
    None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. What will be the output of the following query?

    SELECT *
    FROM employee
    WHERE start_date BETWEEN '2007-01-01' AND '2008-01-01';

  6. A.
    All employees details between 2007 and 2008
    B.
    All employees details before 2008
    C.
    All employees details from 2007 to 2008
    D.
    None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Fill the blanks with suitable options? BETWEEN ______ AND ______
  8. A.
    Upper and lower limit
    B.
    Lower and upper limit
    C.
    Both a and b
    D.
    None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. Find the error in the following query?

    SELECT cust_id, fed_id
    FROM customer
    WHERE cust_id = 'I'
    AND fed_id BETWEEN 5000-00-000 AND 9999-999-000;
  10. A.
    Yes
    B.
    No
    C.
    Range too high to compare
    D.
    None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. What will be the output of the following query?

    SELECT emp_id, fname, lname
    FROM employee
    WHERE LEFT (fname, 1) ='F' OR LEFT (lname, 1) ='F';
  12. A.
    Only those employees are selected whose first name and last name started with 'F'
    B.
    Only those employees are selected whose first name started with 'F' but last name can be starts with any other letter
    C.
    Only those employees are selected whose first name and last name started with any other letter except 'F'
    D.
    None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  13. Which of the following statements is/are correct?
  14. A.
    True AND true =true
    B.
    True AND false= false
    C.
    False AND false= false
    D.
    All of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  15. Which operator is used to check whether the expression is "NULL?
  16. A.
    IS NULL
    B.
    NOT NULL
    C.
    ON
    D.
    None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  17. What will be the output of the following query?

    SELECT fname
    FROM person
    WHERE emp_id != 6;
  18. A.
    Only those names whose emp_id is not equal to 6
    B.
    Only those names whose emp_id is equal to 6
    C.
    Both a and b
    D.
    None of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum


  19. What is the meaning of "NULL in Mysql?
  20. A.
    Not applicable
    B.
    Value not yet known
    C.
    Value undefined
    D.
    All of the mentioned

    View Answer

    Workspace

    Discuss Discuss in Forum