Q1
True / FalseIn PostgreSQL, the DELETE statement is used to remove rows from a table.
The DELETE statement is used to remove existing records from a table in PostgreSQL.
Q2
True / FalseYou must specify a WHERE clause in a DELETE statement to remove rows from a table.
While it is common to use a WHERE clause to specify which rows to delete, it is not required. If omitted, all rows in the table will be deleted.
Q3
True / FalseThe DELETE statement can only be used on a single table in PostgreSQL.
In PostgreSQL, the DELETE statement is designed to delete rows from a single table.
Q4
True / FalseIn PostgreSQL, you can use a RETURNING clause with the DELETE statement to return deleted rows.
The RETURNING clause can be used with DELETE to return the deleted rows or specific columns of the deleted rows.
Q5
True / FalseThe DELETE statement in PostgreSQL can be rolled back if used within a transaction block.
If a DELETE statement is used within a transaction block, it can be rolled back using the ROLLBACK command.
Q6
True / FalseYou can use subqueries in the WHERE clause of a DELETE statement in PostgreSQL.
Subqueries can be used in the WHERE clause of a DELETE statement to specify the rows to be deleted based on the results of the subquery.
Q7
True / FalseIn PostgreSQL, the DELETE statement can reference multiple tables using the USING clause.
The USING clause can be used in a DELETE statement to reference multiple tables for the purpose of specifying conditions in the WHERE clause.
Q8
True / FalseIn PostgreSQL, you cannot use JOINs in a DELETE statement.
PostgreSQL supports the use of JOINs in DELETE statements, allowing you to delete rows from one table based on conditions in another table.
Q9
True / FalseThe DELETE statement in PostgreSQL can be used with CTE (Common Table Expressions).
PostgreSQL allows the use of CTEs in DELETE statements to simplify complex queries.
Q10
True / FalseIn PostgreSQL, the DELETE statement with a RETURNING clause can be used to capture the old and new values of the deleted rows for auditing purposes.
The RETURNING clause in a DELETE statement can only return the old values (the values before deletion). It does not capture new values because the rows are being deleted.