QuestionQ271

VerifiedManipulating Data

You own a table named EMPLOYEES with the following structure:

| Column | Data type | Constraint |

|---|---|---|

| EMPLOYEE_ID | NUMBER | Primary Key |

| FIRST_NAME | VARCHAR2(25) | |

| LAST_NAME | VARCHAR2(25) | |

| HIRE_DATE | DATE | |

What occurs when you run this DELETE statement?

DELETE employees;  
Explanation

A DELETE statement without a WHERE clause deletes every row in the specified table while retaining the table and its definition. Oracle allows the FROM keyword to be omitted in this statement; removing the table itself requires DROP TABLE.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!