This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
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.
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?