以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- "DELETE TOP 1 FROM {条码表} Order By [_Identify]" (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=19085) |
-- 作者:zhangqinyun -- 发布时间:2012/4/26 20:14:00 -- "DELETE TOP 1 FROM {条码表} Order By [_Identify]" Dim cmd As New SQLCommand
SQL 后台直接删除最早的1条数据,错那里了??? |
-- 作者:y2287958 -- 发布时间:2012/4/26 20:46:00 -- Dim cmd As New SQLCommand cmd.CommandText = "DELETE FROM { 条码表 } WHERE [_Identify] = (select min([_Identify]) from { 条码表 })" cmd.ExecuteNonQuery() 试试这个
|
-- 作者:zhangqinyun -- 发布时间:2012/4/26 21:47:00 -- 那我要删100行呢?? |
-- 作者:y2287958 -- 发布时间:2012/4/26 22:05:00 -- Dim cmd As New SQLCommand cmd.CommandText = "DELETE FROM {表A} WHERE [_Identify] in (select top 2 [_Identify] from {表A})" cmd.ExecuteNonQuery() DataTables("表A").Load() 嘿嘿,你很有意思。
|