开发者

force new record to be inserted at the end of table?

开发者 https://www.devze.com 2023-01-21 12:35 出处:网络
whenever i delete a record and then insert new one, new record is inserted at the deleted index? how can i force new r开发者_如何学编程ecord to be inserted at the end of table?the short answer is that

whenever i delete a record and then insert new one, new record is inserted at the deleted index? how can i force new r开发者_如何学编程ecord to be inserted at the end of table?


the short answer is that you can't. The slightly longer answer is that RDBMS technology is based on set-theory and that database tables, like sets, have no distinct order. If you need it to be at the end when you query for that data, I would add an insertion_date field to the table and order by that field in your query.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号