Home » SQL & PL/SQL » SQL & PL/SQL » inserting the data in the deleted part of a table
inserting the data in the deleted part of a table [message #362141] Mon, 01 December 2008 03:23 Go to next message
jyothsna1612
Messages: 68
Registered: June 2008
Member
Hi,

I have a table and inserted from 1 to 50 records...
And now i deleted 20 - 30 means 10 records...

Now i want to insert the 10 records into the deleted portion i.e; between 20-30 portion

How would that be possible...

Please let me know if i'm not clear....


Thanks....
Re: inserting the data in the deleted part of a table [message #362145 is a reply to message #362141] Mon, 01 December 2008 03:29 Go to previous messageGo to next message
Frank Naude
Messages: 4502
Registered: April 1998
Senior Member
Data within heap tables are always unordered. So, you can just re-insert the data. Order is determined when you extract the data by adding an ORDER BY or GROUP BY clause to your query.
Re: inserting the data in the deleted part of a table [message #362159 is a reply to message #362141] Mon, 01 December 2008 04:01 Go to previous messageGo to next message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
What are the "20" and "30" you are talking about? Are they the "rownum" of the rows, or values of a sequence you created yourself?

Rajy
Re: inserting the data in the deleted part of a table [message #362245 is a reply to message #362141] Mon, 01 December 2008 07:50 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
jyothsna1612 wrote on Mon, 01 December 2008 04:23

And now i deleted 20 - 30 means 10 records...



That would be 11 records.

In any event, my guess is that you are going to dispute or worse, ignore what Frank has said.
Re: inserting the data in the deleted part of a table [message #362270 is a reply to message #362141] Mon, 01 December 2008 11:26 Go to previous message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
I am not sure, whether you are aware about the way Oracle stores its data. It is described in the Concepts book, which is part of the documentation, available e.g. online on http://tahiti.oracle.com/.
It is described Chapter 2 "Data Blocks, Extents, and Segments" in Part II "Oracle Database Architecture". Maybe you could precise your question after you read it (and realize that internal data storage is Oracle job not influenceable so precisely as you think).
Previous Topic: Regular Expression
Next Topic: URGENT PLEASE HELP!
Goto Forum:
  


Current Time: Tue Dec 06 12:30:19 CST 2016

Total time taken to generate the page: 0.12979 seconds