自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

SQL中if語句的用法示例

數(shù)據(jù)庫 SQL Server
if語句如何使用是SQL數(shù)據(jù)庫新手都需要掌握的,下面就以實(shí)例的形式為您演示SQL中if語句的用法,供您參考,希望對你有所啟迪。

SQL中if語句是最常見也是最常用的SQL語句之一,下面就將為您舉例說明SQL中if語句的用法,希望對您學(xué)習(xí)SQL中if語句的使用能夠有些許幫助。

  1. _sql = " if not exists (select * from ProDesignSheet5 where Sheet5ID = '" + this.Sheet5id + "') "  
  2.               + " insert into ProDesignSheet5 values('" + this.Sheet5id  
  3.               + "','" + this.Consplacepbfee.ToString()  
  4.               + "','" + this.Searchtestfee.ToString()  
  5.               + "','" + this.Ccdesignfee.ToString()  
  6.               + "','" + this.Propreparefee.ToString()  
  7.               + "','" + this.Elecfee.ToString()  
  8.               + "','" + this.Workerdqfee.ToString()  
  9.               + "','" + this.Cjzpgdqfee.ToString()  
  10.               + "','" + this.Dxsgjxdqfee.ToString()  
  11.               + "','" + this.Debzglfee.ToString()  
  12.               + "','" + this.Jsqtzdkrate.ToString()  
  13.               + "','" + this.Gczljdfee.ToString()  
  14.               + "','" + this.Yuntufee.ToString()  
  15.               + "','" + this.Jfgzjgzfee.ToString()  
  16.               + "','" + this.Wsdyrfee.ToString()  
  17.               + "','" + this.Whclfee.ToString()  
  18.               + "','" + this.Bgyffee.ToString()  
  19.               + "','" + this.Yytfee.ToString()  
  20.               + "','" + this.Hlhtfee.ToString()  
  21.               + "','" + this.Jfxtfee.ToString()  
  22.               + "','" + this.Ybgjfee.ToString()  
  23.               + "','" + this.Gxzfzfee.ToString()  
  24.               + "','" + this.Lyglfee.ToString()  
  25.               + "','" + this.Jfzjfee.ToString()  
  26.               + "','" + this.Gdzjfee.ToString()  
  27.               + "','" + this.Gdlxlzjfee.ToString()  
  28.               + "','" + this.Workteamfee.ToString()  
  29.               + "','" + this.Condeptfee.ToString()  
  30.               + "','" + this.Tower.ToString()  
  31.               + "','" + this.Servicefee.ToString()  
  32.               + "','" + this.Checkfee.ToString()  
  33.               + "','" + this.Other.ToString()  
  34.               + "','" + this.ItemNum.ToString()  
  35.               + "','" + this.ItemName.ToString()  
  36.               + "','" + this.PassId.ToString()  
  37.               + "')"  
  38.               + " else update ProDesignSheet5 set Consplacepbfee='" + this.Consplacepbfee.ToString()  
  39.               + "',Searchtestfee='" + this.Searchtestfee.ToString()  
  40.               + "',Ccdesignfee='" + this.Ccdesignfee.ToString()  
  41.               + "',Propreparefee='" + this.Propreparefee.ToString()  
  42.               + "',Elecfee='" + this.Elecfee.ToString()  
  43.               + "',Workerdqfee='" + this.Workerdqfee.ToString()  
  44.               + "',Cjzpgdqfee='" + this.Cjzpgdqfee.ToString()  
  45.               + "',Dxsgjxdqfee='" + this.Dxsgjxdqfee.ToString()  
  46.               + "',Debzglfee='" + this.Debzglfee.ToString()  
  47.               + "',Jsqtzdkrate='" + this.Jsqtzdkrate.ToString()  
  48.               + "',Gczljdfee='" + this.Gczljdfee.ToString()  
  49.               + "',Yuntufee='" + this.Yuntufee.ToString()  
  50.               + "',Jfgzjgzfee='" + this.Jfgzjgzfee.ToString()  
  51.               + "',Wsdyrfee='" + this.Wsdyrfee.ToString()  
  52.               + "',Whclfee='" + this.Whclfee.ToString()  
  53.               + "',Bgyffee='" + this.Bgyffee.ToString()  
  54.               + "',Yytfee='" + this.Yytfee.ToString()  
  55.               + "',Hlhtfee='" + this.Hlhtfee.ToString()  
  56.               + "',Jfxtfee='" + this.Jfxtfee.ToString()  
  57.               + "',Ybgjfee='" + this.Ybgjfee.ToString()  
  58.               + "',Gxzfzfee='" + this.Gxzfzfee.ToString()  
  59.               + "',Lyglfee='" + this.Lyglfee.ToString()  
  60.               + "',Jfzjfee='" + this.Jfzjfee.ToString()  
  61.               + "',Gdzjfee='" + this.Gdzjfee.ToString()  
  62.               + "',Gdlxlzjfee='" + this.Gdlxlzjfee.ToString()  
  63.               + "',Workteamfee='" + this.Workteamfee.ToString()  
  64.               + "',Condeptfee='" + this.Condeptfee.ToString()  
  65.               + "',Tower='" + this.Tower.ToString()  
  66.               + "',Servicefee='" + this.Servicefee.ToString()  
  67.               + "',Checkfee='" + this.Checkfee.ToString()  
  68.               + "',Other='" + this.Other.ToString()  
  69.               //+ "',ItemNum='" + this.ItemNum.ToString()  
  70.               //+ "',ItemName='" + this.ItemName.ToString()  
  71.               //+ "',PassId='" + this.PassId.ToString()  
  72.               + "' where Sheet5id ='" + this.Sheet5id + "'";  

 

 

 

 

【編輯推薦】

巧用SQL server臨時(shí)表

速學(xué)如何定義SQL存儲(chǔ)過程

sql server表改為dbo的方法

教您sql server表結(jié)構(gòu)的修改方法

上億的sql server表進(jìn)行join的問題

責(zé)任編輯:段燃 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2009-01-14 09:28:12

OracleSQL10g

2011-03-07 13:27:13

SQLCase

2010-09-08 16:17:37

SQL循環(huán)語句

2010-09-25 14:59:54

SQL語句

2010-11-11 11:13:54

SQL Server

2010-11-11 11:49:02

SQL嵌套SELECT

2010-09-07 13:41:50

SQL語句

2010-07-26 16:39:57

SQL Server

2010-10-08 15:54:34

mysql中case

2010-09-06 09:11:24

SQLUPDATE語句

2022-03-23 14:04:32

SQL字符串數(shù)據(jù)類型

2010-05-11 10:12:50

mysql數(shù)據(jù)庫sql

2022-05-19 23:40:34

SQL語句引號

2023-11-15 20:24:54

數(shù)據(jù)庫SQLGo語言

2010-09-08 15:42:46

SQL指令UNION

2010-09-10 15:04:41

SQLDATENAME函數(shù)

2021-08-16 08:12:04

SQLMerge用法

2010-11-12 13:08:36

動(dòng)態(tài)sql語句

2010-09-17 16:53:14

SQL中CREATE

2010-09-07 11:53:00

SQL語句
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號