fifo的rdata,删除数据FIFO方法

how do i delete a data from table using FIRST IN FIRST OUT (FIFO) method.i have date and ID.

using C# and SQL2008.

解决方案You are confusing yourself! As per comments made you can do a simple delete based on either Date field or ID field.

Assuming you are inserting the records in incremental order for either of the date /ID columns, you can delete the 1st record easily.

In case you are not inserting data in incremental order in any of the fields, you should add a IDENTITY column to your table and delete data based on the value of this identity table.

Hope this helps!

QUOTE: include my application first i add some items in beginning of the month.so i want to remove added item in last of the same month.(i want to firstly remove first added items).so that's why asked how to delete items using FIFO method..

thnx..

Then it seems that you need, in your table, a column holding the date the record was added.

And you can delete the records with specifying this column in your WHERE clause (cannot really give a precise SQL statement as your requirement still seems a little bit obscure to me).

Start from here and come back if you have problems along the way.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值