Pages

Search This Blog

Tuesday, 14 February 2012

STORED PROCEDURE TO DELETE RECORDS IN A TABLE

This stored procedure is used to delete records or rows in a table. This stored procedure can be invoked my a job periodically for clean up process.

 SQL> create procedure delrows
  2  is
  3  begin
  4  delete from salestbl;
  5  end;
  6  /

delrows-procedure name
salestbl- table name

Executing the procedure
exec(delrows);

No comments:

Post a Comment