W3Cschool
恭喜您成為首批注冊用戶
獲得88經驗值獎勵
1.基礎語法
UPDATE table_name SET column1 = value1, column2 = value2...., columnN = valueN WHERE [condition]; 例如:
例:update tb set UserName="XXXXX" where UserID="aasdd"
2.對某些字段變量+1,常見的如:點擊率、下載次數(shù)等
update tb set clickcount=clickcount+1 where ID=xxx
3.將同一記錄的一個字段賦值給另一個字段 update tb set Lastdate= regdate where XXX
4.多表聯(lián)合更新記錄
4.1將一個表中的一批記錄更新到另外一個表中
update table1,table2 set table1.f1=table2.f1,table1.f2=table2.f2 where table1.ID=table2.ID
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: