COMPUTER SCIENCE AND ENGINEERING
SQL
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
limits the column data that are returned.
|
|
limits the row data are returned.
|
|
Both A and B are correct.
|
|
Neither A nor B are correct.
|
Detailed explanation-1: -Which of the following clause is used to limit the number of rows retrieved from a SELECT query? Answer: B. The WHERE clause is used to restrict the number of rows returned from a SELECT query.
Detailed explanation-2: -The maximum number of clauses in a WHERE clause is 40.
Detailed explanation-3: -Row Limiting clause is useful to limit the number of records to return on large tables with thousands of records. TOP, ROWNUM, LIMIT, FETCH are Row Limiting clauses used to specify the number of records to return. OFFSET clause specifies the number of rows to skip before the row limiting starts.
Detailed explanation-4: -The SQL WHERE clause is used to specify a condition while fetching the data from a single table or by joining with multiple tables. If the given condition is satisfied, then only it returns a specific value from the table. You should use the WHERE clause to filter the records and fetching only the necessary records.