mysql - 尝试删除表 MySQL 中的字段内容后出错

标签 mysql database

我有一个数据库,其中有一个表,其中包含成员个人资料信息。我想将他们的头像恢复为默认值,这将需要我删除已经创建的条目。表名为 core_members,字段名为 pp_main_photo。

我用过这个:

UPDATE core_members SET pp_main_photo = NULL;

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

我的代码有问题吗?

最佳答案

更新 core_members 设置 pp_main_photo = NULL 其中 pp_main_photo 不为空;

关于mysql - 尝试删除表 MySQL 中的字段内容后出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42611223/

相关文章:

javascript - 如何以正确的顺序显示日期? ( react native )

python - 简单的 Python-MySQL 桥?

php - 从 URL 获取图像,存储,动画?听起来像是一个挑战

mysql - (错误号 : 150 "Foreign key constraint is incorrectly formed")

MySQL 作业无法启动

PHP/MySQL - 从数据库中获取一行

mysql - Select 查询检查的行多于表中现有的行

mysql查询使用like无效

mysql - 通过存储过程创建具有动态名称的表

php - 在 phpMyAdmin 中更改 MySQL root 密码