[英]force new record to be inserted at the end of table?
whenever i delete a record and then insert new one, new record is inserted at the deleted index? 每当我删除一条记录然后插入新记录时,新记录就会插入到已删除的索引处? how can i force new record 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.
稍长一点的答案是,RDBMS技术基于集合论,而数据库表(如集合)没有明确的顺序。 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.
如果您需要在查询该数据时将其结尾,则可以在表中添加一个insert_date字段,并按查询中的该字段排序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.