Question : Which SQL statement is used to remove rows from a table?
Solution :
Correct Answer : DELETE
Description -
Question : What happens if the WHERE clause is omitted in a DELETE statement?
Solution :
Correct Answer : All rows are deleted
Description -
Question : Which statement removes all rows but keeps the table structure?
Solution :
Correct Answer : DELETE FROM table_name
Description -
Question : Which command permanently removes a table structure and data?
Solution :
Correct Answer : DROP TABLE
Description -
Question : Which keyword is mandatory in a DELETE statement?
Solution :
Correct Answer : FROM
Description -
Question : Which statement deletes only specific rows?
Solution :
Correct Answer : DELETE with WHERE clause
Description -
Question : Which SQL command is faster for deleting all rows?
Solution :
Correct Answer : TRUNCATE
Description -
Question : Which statement deletes duplicate rows from a table?
Solution :
Correct Answer : DELETE using ROW_NUMBER()
Description -
Question : Which clause is commonly used with DELETE to avoid accidental deletion?
Solution :
Correct Answer : WHERE
Description -
Question : What does the following query do?
DELETE FROM employee WHERE salary > 50000;
Solution :
Correct Answer : Deletes employees with salary greater than 50000
Description -
Question : Which command removes a database completely?
Solution :
Correct Answer : DROP DATABASE
Description -
Question : Can DELETE be rolled back in transactions?
Solution :
Correct Answer : Yes
Description -
Question : Which SQL statement deletes rows using JOIN condition?
Solution :
Correct Answer : DELETE with INNER JOIN
Description -
Question : Which statement is true about DELETE?
Solution :
Correct Answer : Rows are removed
Description -
Question : What is the result of this query?
DELETE FROM orders WHERE order_id = 101;
Solution :
Correct Answer : Deletes order with ID 101
Description -
Question : Which command deletes a SQL VIEW?
Solution :
Correct Answer : DROP VIEW
Description -
Question : Which of the following is NOT related to deletion?
Solution :
Correct Answer : SELECT
Description -
Question : Which SQL statement deletes all duplicate rows except one?
Solution :
Correct Answer : DELETE using ROW_NUMBER()
Description -
Question : What will happen after executing:
DELETE FROM students;
Solution :
Correct Answer : All student records deleted
Description -
Question : Which statement is correct regarding DELETE and DROP?
Solution :
Correct Answer : DELETE removes rows, DROP removes entire object
Description -