aspose file tools
The moose likes JDBC and the fly likes Record Deletion Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Record Deletion" Watch "Record Deletion" New topic
Author

Record Deletion

ford Darcy Jr
Ranch Hand

Joined: Jan 26, 2005
Posts: 76
Hi,

I am using mysql database. If a record in deleted say with recordid: 5, the next record that is the recordid:6, should move to the fifth position. How can I achieve this. Could anybody please help me on this.

Thanks.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

I think you misunderstand relational databases. A database table is a collection of rows. The row number (which I guess is what you are talking about when you say "position" and "recordid") is not a feature of most databases and should not be relied on. Furthermore, an SQL Select statement is allowed to return rows in any order, unless an Order By clause is provided to control the order of rows. So basically row number is meaningless.

Or is "recordid" a column in your table, and you want to arrange things so the values in that column always form a sequence with no gaps? If so, why?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Record Deletion
 
Similar Threads
Locking and client identification
sms
how to get Record ID in RMS
Getting next record
B&S Record Number Question