【发布时间】:2017-08-21 18:57:54
【问题描述】:
我正在构建一个小的共轭/激进化应用程序,但我偶然发现了一个问题。我有这个 SQL 请求:
SELECT DISTINCT RA.*
FROM radical RA
left join conjugated CO
on CO.word_id = RA.id
where CO.conjugation IN ('I', 'am', 'a', 'cat')
返回:
| id | radical |
| 13 | to be |
但是,我想得到以下类型的结果:
| id | radical | word |
| null | null | I |
| 13 | to be | am |
| null | null | a |
| null | null | cat |
有人知道怎么做吗?
【问题讨论】:
-
请发布您的示例数据
标签: mysql sql where-in correspondence