Mysql Setup
- Which clause is used to sort query elements?
-
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.
- What does comparing a known value with NULL result into?
-
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’.
- The NULL value also means ___________.
-
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.
- Which operator is used to perform integer divisions in MySQL?
-
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.
- What is ‘Employee’ in the following statement?
SELECT name FROM Employee;
-
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’.