Home » SQL & PL/SQL » SQL & PL/SQL » deletion of last 10 rows from a table
deletion of last 10 rows from a table [message #6861] Fri, 09 May 2003 00:05 Go to next message
robin baby
Messages: 13
Registered: May 2003
Junior Member
can i remove last 10 records from a table ?if it possible how?
Re: deletion of last 10 rows from a table [message #6864 is a reply to message #6861] Fri, 09 May 2003 00:32 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Depends on how you define 'last'. I assume you mean the last records that are inserted. Oracle is a relational database. Each table contains a collection of data which is unsorted. Unless you have some audit field (like a creation_date) in your table definition which contains a timestamp or you have an auditing mechanism which keeps track of all DML, you cannot identify the last records. In fact, there's no such thing as last record from Oracle's point of view. Oracle allocates space and there's no way you can tell in advance where Oracle will put it (physically). Look also here or here.

HTH,
MHE
Previous Topic: use of global variable
Next Topic: date formatting
Goto Forum:
  


Current Time: Fri Apr 26 10:59:46 CDT 2024