我是靠谱客的博主 安静咖啡,这篇文章主要介绍mysql中where后left,使用WHERE子句的MySQL LEFT JOIN查询,现在分享给大家,希望可以做个参考。

Hope someone can help as I am having a hard time understanding how to query properly

I have a Member table and a Member_Card table. Member_Card has a column Member, so the card is associated to a member. Both tables have a LastModifiedDate column. A member can have none, one or several cards.

I need to return all members whose LastModifiedDate >= sinceDate (given date) OR whose card (if any) LastModifiedDate >= sinceDate.

Imagine sinceDate is 2013-01-01 00:00:00. I want to output something like this:

[{

"Id": "001O000000FsAs7IAF",

"LastModifiedDate": 2013-01-01 00:00:00,

"Member_Card": null

}, {

"Id": "001O000000FrpIXIAZ",

"LastModifiedDate": 2012-12-12 00:00:00,

"Member_Card": [{

"Id": "

最后

以上就是安静咖啡最近收集整理的关于mysql中where后left,使用WHERE子句的MySQL LEFT JOIN查询的全部内容,更多相关mysql中where后left,使用WHERE子句的MySQL内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(59)

评论列表共有 0 条评论

立即
投稿
返回
顶部