将 null 更新为非 null

发布于 2024-10-08 18:18:48 字数 278 浏览 0 评论 0原文

我有一个链接,如果 Ser 单击它应该将空字段更新为非空,但我得到

第 3 行'delete ='NOT NULL' where ThirdPartyCategoryID=29' 附近出现 1064 mysql 错误

这是我的查询

ALTER table thirdpartycategorymaster Modify delete char(1) NOT NULL 

我哪里出错了?

I have a link if ser clicks it should update null field to not null but i am getting

1064 mysql error near 'delete ='NOT NULL' where ThirdPartyCategoryID=29' at line 3

This is my query

ALTER table thirdpartycategorymaster Modify delete char(1) NOT NULL 

where am i going wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无声无音无过去 2024-10-15 18:18:48
alter table thirdpartycategorymaster 
modify column `delete` char(1) NOT NULL;
alter table thirdpartycategorymaster 
modify column `delete` char(1) NOT NULL;
骷髅 2024-10-15 18:18:48

删除是保留字,因此您需要使用括号

update  thirdpartycategorymaster 
set     ThirdPartyCategoryName='ecommerce', 
        [delete] ='NOT NULL' 
where   ThirdPartyCategoryID=29 

或标识符引号字符反引号(“`”)

看看 架构对象名称

Delete is a reserved word, so you need to use either brackets such as

update  thirdpartycategorymaster 
set     ThirdPartyCategoryName='ecommerce', 
        [delete] ='NOT NULL' 
where   ThirdPartyCategoryID=29 

or identifier quote character backtick (“`”)

Have a look at Schema Object Names

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文