我有两个 MySQL 查询
QUERY:
SELECT sodnik_1 FROM prihodnji_krog WHERE file_id='8778' AND sodnik_1 != ''
UNION
SELECT sodnik_2 FROM prihodnji_krog WHERE file_id='8778' AND sodnik_2 != ''
UNION
SELECT sodnik_3 FROM prihodnji_krog WHERE file_id='8778' AND sodnik_3 != ''
UNION
SELECT sodnik_4 FROM prihodnji_krog WHERE file_id='8778' AND sodnik_4 != ''
QUERY:
SELECT value FROM notification_sodniki WHERE user_id='16'
OUTPUT LOOKS LIKE THIS:
Name 1
Name 2
Name 3
Name 4
IN BOTH TABLES
他们给了我 1 列。我想执行交叉连接并仅返回两个选择查询中都存在的值。那可能吗 ?