mysql - 检查记录是否存在返回错误结果
问题描述
我有一个名为的表match_lineup_substitute
,其中包含以下记录:
player_substitute_id | player_substituted_id | match_id |
90930 NULL 2807486
我想检查记录是否存在,所以我写了这个查询:
SELECT COUNT(*) FROM `match_lineup_substitute`
WHERE match_id = 2807486 AND
player_substitute_id = 90930 AND player_substituted_id = null
这将返回:0
发生了什么?
解决方案
推荐阅读
- php - barryvdh/laravel-dompdf 无法流式传输我的发票,它只是一直在 laravel 应用程序中加载
- javascript - 如何在 PHP Laravel 中使用 SQL 语句打印所有数组?
- php - 致命错误:无法重新声明 format_currency()(之前在
- node.js - 在 CI / CD 管道中运行 cypress 测试的最佳实践是什么?
- laravel - 如何将所有 laravel 异常消息写入特定文件。如模型异常
- swiftui - 使用 Swift UI 将 CLLocationManager 的代表放在哪里?
- botframework - BotComposer,如何使用 lg 语言遍历字符串的字符?
- machine-learning - 计算kmeans模型的准确度得分
- react-native - 如何在 android studio 上运行 expo 弹出的应用程序
- python - 使用python在表格中显示csv数据