Mysql Setup


  1. Which clause is used to sort query elements?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    An ‘ORDER BY’ clause specifies the sort order. The data is sorted in ascending order by default. To sort in descending order, the keyword DESC is appended to the ‘ORDER BY’ clause. ‘GROUP BY’ is used to group the query results according to a criteria.


  1. What does comparing a known value with NULL result into?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    In MySQL, NULL is not comparable to other known values. It will result in a NULL when compared to any value. The following statement would result in four NULLs: ‘SELECT NULL = 0, NULL < 0, NULL <> 0, NULL > 0’.



  1. The NULL value also means ___________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    The NULL value in MySQL is a special value. It represents ‘no value’ or an ‘unknown value’. A NULL value can’t be compared like normal known values since it gives undesirable results.


  1. Which operator is used to perform integer divisions in MySQL?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    The operator ‘DIV’ is used to perform integer divisions in MySQL. ‘//’ is used in languages like Python to do the same. The operator ‘/’ performs floating point divisions and ‘\’ is facilitates escape sequences.



  1. What is ‘Employee’ in the following statement?
    SELECT name FROM Employee;











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    The SELECT clause is used to retrieve information from some specified tables. It follows a specified format for information retrieval. Here, ‘name ’ can be a column name. It must be present in the table ‘Employee’.