|
|||||||||||
|
Re: Delete data from databases
From: Ananda Kumar <anandkl(at)gmail.com>
Date: Thu Jul 05 2007 - 01:42:02 EDT
select item_id from table_name where <date_column> < sysdate - 180. This cursor will give you value of a column older than 180 days, and inside the main stored proc, you can use a delete statment, to delete each item_id. delete from <table_name> where item_id=<variable_name>; commit for every 1000 or 10000 records, so that there is no rollback issue. Also if data is very less than you can directly use the delete statment rather than doing this in stored proc.
regards
On 7/5/07, krishna chandra prajapati <prajapatikc@gmail.com> wrote:
This archive was generated by hypermail 2.1.8 : Thu Jul 05 2007 - 01:50:02 EDT |
||||||||||
|
|||||||||||