asp+sql server用DELETE语句时,一般删除一条记录后ID会不连续,才能让序号继续按顺序排列?
我先删除再更新不行啊SqlCommandcmd=newSqlCommand("deletefromFeedbackwhereFeedback_ID="+id,conn);...
我先删除再更新不行啊
SqlCommand cmd = new SqlCommand("delete from Feedback where Feedback_ID=" + id, conn);
SqlCommand cmd1 = new SqlCommand("Update Feedback set Feedback_ID=Feedback_ID-1 where Feedback_ID>"+id, conn); 展开
SqlCommand cmd = new SqlCommand("delete from Feedback where Feedback_ID=" + id, conn);
SqlCommand cmd1 = new SqlCommand("Update Feedback set Feedback_ID=Feedback_ID-1 where Feedback_ID>"+id, conn); 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询