Mysql 更新列以值开头的表';st';%
我正在尝试更新productcode以ST开头的专栏品牌Mysql 更新列以值开头的表';st';%,mysql,Mysql,我正在尝试更新productcode以ST开头的专栏品牌 `Update outerbarcodes set brand='A' where productcode = 'ST%';` 由于某些原因,上面的代码不起作用。使用类似的运算符,而不是= Update outerbarcodes set brand='A' where productcode like 'ST%' 谢谢你的快速回复。。。有什么区别?只是curious@Eduards,您正在匹配字符串,这就是为什么需要like w
`Update outerbarcodes set brand='A' where productcode = 'ST%';`
由于某些原因,上面的代码不起作用。使用
类似的运算符,而不是=
Update outerbarcodes set brand='A' where productcode like 'ST%'
谢谢你的快速回复。。。有什么区别?只是curious@Eduards,您正在匹配字符串,这就是为什么需要like where as=将检查精确值,例如name='xyz',它将只返回xyz,但如果使用like'x%',它将返回所有sho start和xAhh!