What happens when you execute this DELETE statement?

You own a table called EMPLOYEES with this table structure:
EMPLOYEE_ID NUMBER Primary Key
FIRST_NAME VARCHAR2(25)
LAST_NAME VARCHAR2(25)
HIRE_DATE DATE
What happens when you execute this DELETE statement?
DELETE employees;

You own a table called EMPLOYEES with this table structure:
EMPLOYEE_ID NUMBER Primary Key
FIRST_NAME VARCHAR2(25)
LAST_NAME VARCHAR2(25)
HIRE_DATE DATE
What happens when you execute this DELETE statement?
DELETE employees;

A.
You get an error because of a primary key violation.

B.
The data and structure of the EMPLOYEES table are deleted.

C.
The data in the EMPLOYEES table is deleted but not the structure.

D.
You get an error because the statement is not syntactically correct.

Explanation:
You can remove existing rows from a table by using the DELETE
statement.
DELETE [FROM] table
[WHEREcondition];
Incorrect answer:
AStatement will not cause error
BDelete statement will not delete the table structure
DStatement will not cause error
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 8-19



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Naj

Naj

Isn’t it D?…because syntax is delete from

prince jain

prince jain

you can use as ‘delete table_name’