There could be several reasons why a MySQL query returning a foreign key constraint could return an empty result:
To troubleshoot and resolve this issue, you can check the data in the related tables, double-check the query syntax, and verify that the foreign key relationships are properly defined in the database schema.
亿速云「云数据库 MySQL」免部署即开即用,比自行安装部署数据库高出1倍以上的性能,双节点冗余防止单节点故障,数据自动定期备份随时恢复。点击查看>>
推荐阅读:为何mysql查询外键很慢