使用参数值和id更新Null值详细信息? [英] Update Null value details using parameter value and id?
本文介绍了使用参数值和id更新Null值详细信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们有A表... ...
Id参数重量
1 1 10
1 2 20
1 3 30
1 4 40
2 1 Null
2 2 Null
2 3 Null >
2 4 Null
使用参数值和id更新空值详细信息?
We have table A like…
Id Parameter Weight
1 1 10
1 2 20
1 3 30
1 4 40
2 1 Null
2 2 Null
2 3 Null
2 4 Null
Update Null value details using parameter value and id?
推荐答案
更新[tablename] set weight = 123其中[Id] = 2和[Parameter] = 1
update [tablename] set weight = 123 where [Id] = 2 and [Parameter] = 1
如果我理解正确你要更新表A->当前重量列根据Id和参数标准对其他值赋值为空。
如果这是你想要的,那么你可以使用下面的SQL
If i understood you correctly you want to update TABLE A->Weight column which currently has null values to other value based on Id and Parameter criteria.
If this is what you want then you can use below SQL
UPDATE <table_name>
SET WEIGHT = <SOME_VALUE>
WHERE ID = 2
AND PARAMTER IN (1, 2, 3 , 4)
WHERE WEIGHT IS NULL
>
您好,
查看此
Hi,
Check this
Update tableA set Weight=10--(required Value)
where id=2--(required Id)
and parameter=1--(required Parameter)
希望这会对你有所帮助。
干杯
Hope this will help you.
Cheers
这篇关于使用参数值和id更新Null值详细信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文