Asp.net Gridview用sqlserver查询 [英] Asp.net Gridview with sqlserver query
本文介绍了Asp.net Gridview用sqlserver查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好先生,
在我的项目中,有一张员工表。该表有一个gridview列,即Grade,值为A,B,C,D。还有列年龄。我想删除年龄> 58岁的A级,B级和C级以及年龄> 60岁的D级记录。
Plz先生发送解决方案。 紧急。
解决方案
创建一个存储的pro
create proc proce_name
作为开始
从table_name删除A,B,C,其中age> 58
从table_name删除D,其中age> 60
结束
执行存储
您好,
试试这个
从等级('''',''B'',''C'')和年龄> 58或等级中删除=''d''和年龄> 60
hi
您可以使用ado.net或更新技术的sqlCommand,并删除sql查询以从中删除信息表
Hello sir,
In my project an employee table is there.having a gridview column of that table i.e. Grade,values are A,B,C,D.And also having a column age .I want to delete the records of grade-A,B,C whose age>58 And of grade-D whose age>60.
Plz sir send the solution. Urgent.
解决方案
create a stored pro
create proc proce_name
as begin
Delete A,B,C from table_name where age>58
Delete D from table_name where age>60
end
execute stored
Hi,
Try this
delete from grade where grade in(''A'',''B'',''C'') and age>58 or grade=''d'' and age>60
hi
you can use sqlCommand from ado.net or newer technology, and delete sql query to remove info from table.
这篇关于Asp.net Gridview用sqlserver查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文