如何使用MySQL GUI工具使字段为NULL? [英] How to make a field NULL using MySQL GUI Tools?

查看:88
本文介绍了如何使用MySQL GUI工具使字段为NULL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MySQL查询浏览器( MySQL GUI工具的一部分 ),并且需要将字段更改为NULL,但是我不知道该怎么做-如果删除该值,它将尝试将其更新为''.键入"NULL"会使它尝试更新为'NULL'(字符串).

I'm using the MySQL Query Browser (part of the MySQL GUI Tools) and need to change a field to NULL, but I can't figure out how to do it - if I delete the value it tries to update it to ''. Typing "NULL" makes it try to update to 'NULL' (a string).

我知道我可以编写一个查询来做到这一点,但这违反了工具的全部目的,不是吗?

I know I could just write a query to do it, but that defeats the entire purpose of the tool, no?

推荐答案

在MySQL查询浏览器中,右键单击该单元格,然后在焦点位于另一个单元格中时选择清除字段内容".

In MySQL Query Browser, right click on the cell and select 'Clear field content' while the focus is in another cell.

在MySQL Workbench中,右键单击该单元格,然后选择将字段设置为NULL".

In MySQL Workbench, right click on the cell and select 'Set Field to NULL'.

这篇关于如何使用MySQL GUI工具使字段为NULL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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