Click here to Skip to main content
15,887,350 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
I want to insert a new row between
existing 2 rows
write a query to insert new row
between existing row

example :record ram
record ravi
I want to insert between new record between ram and ravi
Posted
Comments
[no name] 4-Jul-12 7:51am    
You can't. Don't bother trying. There is no reason to even do this.
phil.o 4-Jul-12 8:34am    
You never have to worry about the way the database engine is handling its storage space.
Thus there is no point in inserting a record between two existing rows.
You handle the sort of the data when you QUERY it, not when you add a record.

1 solution

New rows are stored according to the available space in the database table. You cannot insert rows at any specific position. However, you can have the results of any query sorted with the ORDER BY sql keyword.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900