MCQs – SQL Basics

Q) Wrong statement about UPDATE keyword is

  1. If WHERE clause in missing in statement the all records will be updated.
  2. Only one record can be updated at a time using WHERE clause
  3. Multiple records can be updated at a time using WHERE clause
  4. None is wrong statement
View Answer

Q) Wrong statement about ORDER BY keyword is

  1. Used to sort the result-set in ascending or descending order
  2. The ORDER BY keyword sorts the records in ascending order by default.
  3. To sort the records in ascending order, use the ASC keyword.
  4. To sort the records in descending order, use the DECENDING keyword.
View Answer

Q) Correct syntax query syntax to drop a column from a table is

  1. DELETE COLUMN column_name;
  2. DROP COLUMN column_name;
  3. ALTER TABLE table_name DROP COLUMN column_name;
  4. None is correct.
View Answer

Q) If you want to allow age of a person > 18 in the column Age of table Person, then which constraint will be applied to AGE column.

  1. Default
  2. Check
  4. None
View Answer