Friday, June 25, 2010

Delete In Oracle / SQL

Assume table name is EMPLOYEE and it has E_NAME Field
Delete All Rows In Tables
DELETE TABLE_NAME;
DELETE EMPLOYEE;
Delete All Rows In Tables
DELETE FROM TABLE_NAME;
DELETE FROM EMPLOYEE;
Delete Selected Rows In Tables
DELETE FROM TABLE_NAME WHERE CONDITION;
DELETE FROM EMPLOYEE WHERE E_NAME = 'RAJU';
Delete through Select Rows In Tables
DELETE FROM (SELECT * FROM TABLE_NAME WHERE CONDITION);
DELETE FROM (SELECT * FROM EMPLOYEE WHERE E_NAME = 'RAJU');
Post a Comment