SQL中if语句是最常见也是最常用的SQL语句之一,下面就将为您举例说明SQL中if语句的用法,希望对您学习SQL中if语句的使用能够有些许帮助。
创新互联专注于绿春企业网站建设,成都响应式网站建设公司,商城建设。绿春网站建设公司,为绿春等地区提供建站服务。全流程定制网站开发,专业设计,全程项目跟踪,创新互联专业和态度为您提供的服务
- _sql = " if not exists (select * from ProDesignSheet5 where Sheet5ID = '" + this.Sheet5id + "') "
- + " insert into ProDesignSheet5 values('" + this.Sheet5id
- + "','" + this.Consplacepbfee.ToString()
- + "','" + this.Searchtestfee.ToString()
- + "','" + this.Ccdesignfee.ToString()
- + "','" + this.Propreparefee.ToString()
- + "','" + this.Elecfee.ToString()
- + "','" + this.Workerdqfee.ToString()
- + "','" + this.Cjzpgdqfee.ToString()
- + "','" + this.Dxsgjxdqfee.ToString()
- + "','" + this.Debzglfee.ToString()
- + "','" + this.Jsqtzdkrate.ToString()
- + "','" + this.Gczljdfee.ToString()
- + "','" + this.Yuntufee.ToString()
- + "','" + this.Jfgzjgzfee.ToString()
- + "','" + this.Wsdyrfee.ToString()
- + "','" + this.Whclfee.ToString()
- + "','" + this.Bgyffee.ToString()
- + "','" + this.Yytfee.ToString()
- + "','" + this.Hlhtfee.ToString()
- + "','" + this.Jfxtfee.ToString()
- + "','" + this.Ybgjfee.ToString()
- + "','" + this.Gxzfzfee.ToString()
- + "','" + this.Lyglfee.ToString()
- + "','" + this.Jfzjfee.ToString()
- + "','" + this.Gdzjfee.ToString()
- + "','" + this.Gdlxlzjfee.ToString()
- + "','" + this.Workteamfee.ToString()
- + "','" + this.Condeptfee.ToString()
- + "','" + this.Tower.ToString()
- + "','" + this.Servicefee.ToString()
- + "','" + this.Checkfee.ToString()
- + "','" + this.Other.ToString()
- + "','" + this.ItemNum.ToString()
- + "','" + this.ItemName.ToString()
- + "','" + this.PassId.ToString()
- + "')"
- + " else update ProDesignSheet5 set Consplacepbfee='" + this.Consplacepbfee.ToString()
- + "',Searchtestfee='" + this.Searchtestfee.ToString()
- + "',Ccdesignfee='" + this.Ccdesignfee.ToString()
- + "',Propreparefee='" + this.Propreparefee.ToString()
- + "',Elecfee='" + this.Elecfee.ToString()
- + "',Workerdqfee='" + this.Workerdqfee.ToString()
- + "',Cjzpgdqfee='" + this.Cjzpgdqfee.ToString()
- + "',Dxsgjxdqfee='" + this.Dxsgjxdqfee.ToString()
- + "',Debzglfee='" + this.Debzglfee.ToString()
- + "',Jsqtzdkrate='" + this.Jsqtzdkrate.ToString()
- + "',Gczljdfee='" + this.Gczljdfee.ToString()
- + "',Yuntufee='" + this.Yuntufee.ToString()
- + "',Jfgzjgzfee='" + this.Jfgzjgzfee.ToString()
- + "',Wsdyrfee='" + this.Wsdyrfee.ToString()
- + "',Whclfee='" + this.Whclfee.ToString()
- + "',Bgyffee='" + this.Bgyffee.ToString()
- + "',Yytfee='" + this.Yytfee.ToString()
- + "',Hlhtfee='" + this.Hlhtfee.ToString()
- + "',Jfxtfee='" + this.Jfxtfee.ToString()
- + "',Ybgjfee='" + this.Ybgjfee.ToString()
- + "',Gxzfzfee='" + this.Gxzfzfee.ToString()
- + "',Lyglfee='" + this.Lyglfee.ToString()
- + "',Jfzjfee='" + this.Jfzjfee.ToString()
- + "',Gdzjfee='" + this.Gdzjfee.ToString()
- + "',Gdlxlzjfee='" + this.Gdlxlzjfee.ToString()
- + "',Workteamfee='" + this.Workteamfee.ToString()
- + "',Condeptfee='" + this.Condeptfee.ToString()
- + "',Tower='" + this.Tower.ToString()
- + "',Servicefee='" + this.Servicefee.ToString()
- + "',Checkfee='" + this.Checkfee.ToString()
- + "',Other='" + this.Other.ToString()
- //+ "',ItemNum='" + this.ItemNum.ToString()
- //+ "',ItemName='" + this.ItemName.ToString()
- //+ "',PassId='" + this.PassId.ToString()
- + "' where Sheet5id ='" + this.Sheet5id + "'";
文章题目:SQL中if语句的用法示例
URL网址:http://www.mswzjz.cn/qtweb/news49/537649.html
攀枝花网站建设、攀枝花网站运维推广公司-贝锐智能,是专注品牌与效果的网络营销公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 贝锐智能