0
我想基於2列大跳UPSERT(更新或創建)如何創建JDBC UPSERT查詢: 如果列A和B列在表中exsists然後更新值否則創建一個新行這個關鍵。基於2個鍵
//pasdo code for my query
if(table.key1 == firstKey && table.key2 == secKey){
//update values for the row with key1, key2
} else {
//create a row with firstKey, secKey as keys
}
我有在後端的Oracle SQL服務器。
所以,問題是... –
如何建立這樣的查詢.... –
只是谷歌的更新和插入查詢,你會得到很多的例子。 –