如何将包含特殊字段设置为null? [英] How can we set a contains of special fields to null?

查看:99
本文介绍了如何将包含特殊字段设置为null?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


表格字段中有很多记录。我想将字段的包含设置为仅对某些记录为空。

例如:



更新mytable

设置myfields = null

其中myfields ='a'



但第二行Set myfields = null不正确。< br $>


如何解决?





非常感谢

Hi There are many records in a field of table. I want to set contains of field to null only for some records.
For example :

Update mytable
Set myfields = null
Where myfields = ‘a’

But the second line "Set myfields = null" is not correct.

How can I solve it?


Thanks very much

推荐答案

我用我的SQL表尝试了它,它工作正常:

I tried it with my SQL table, and it worked fine:
UPDATE MyTable SET myColumn = null WHERE Id = 3

因此,假设您的列可以包含空值,您的代码应该可以正常工作。



那么你在做什么与我有什么不同?

So assuming that your column can contain null values, your code should work fine.

So what are you doing that is different from me?


这篇关于如何将包含特殊字段设置为null?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆