set serveroutput on;
CREATE OR REPLACE PROCEDURE dup_pro IS
v_rows_del NUMBER;
BEGIN
DELETE FROM s
WHERE ROWID NOT IN (SELECT MIN (ROWID)
FROM s
GROUP BY last_name);
v_rows_del := SQL%ROWCOUNT;
DBMS_OUTPUT.put_line (v_rows_del || ' rows deleted.');
END dup_pro;
/
show error;
exec dup_pro;
Select * from s;
Windows Recall : How to disable spy mode
4 days ago
No comments:
Post a Comment