Search This Blog

Monday, May 21, 2018

Delete Multiple Row From A Table in Oracle

DECLARE
   V_COUNT   NUMBER;
BEGIN
   DELETE FROM EMPLOYEES
         WHERE ROWID IN (SELECT ROWID
                         FROM (SELECT ROWID,
                               ROW_NUMBER ()
                               OVER (PARTITION BY EMPLOYEE_ID
                                     ORDER BY 1)ROW_NO
                                   FROM EMPLOYEES)
                          WHERE ROW_NO > 1);
   V_COUNT := SQL%ROWCOUNT;
   DBMS_OUTPUT.PUT_LINE(V_COUNT);
END;

No comments:

Post a Comment

Restrict File Upload by File Type in Oracle Apex

If you want to restrict file upload by file type/extension/format you can follow the below steps.  Goto File Browser Item --> Advanced --...