我要更新Data_type
,其中Data_Type
包含Null或除D之外的字符串
如果有任何字符串,我该如何编码
Update Table_Name
Set Data_Type='D'
Where Data_type is Null
or Data_type = ' ' or like Data_type %[A-C]% or Data_Type %[e-z]%
Go
--
答案 0 :(得分:1)
您的语法错误。应该是
Update Table_Name
Set Data_Type = 'D'
Where Data_Type <> 'D'
and src_hm <> 1
and (
Data_type is Null
or Data_type = ' '
or Data_type like %[A-C]%
or Data_Type like %[e-z]%
)