Which of the following commands is correct to delete the values in the relation teaches?

Asked In: BPSC TRE 3.0

Options

  • A. Delete from teaches;
  • B. Delete from teaches where Id='Null';
  • C. Remove table teaches;
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

A. Delete from teaches;

Detailed Explanation

  • DELETE FROM teaches; Removes all records from the teaches table while keeping the table structure.
  • WHERE clause: Can be used to delete selected records only.
  • REMOVE TABLE: Is not a standard SQL command.