IN的另類寫法

EXPLAIN SELECT * FROM `tcb_capital_log` WHERE id IN(66,79,47)

EXPLAIN SELECT * FROM (
	SELECT 66 AS id UNION ALL
	SELECT 79 AS id UNION ALL
	SELECT 47 AS id
) AS tmp , tcb_capital_log WHERE
tcb_capital_log.id = tmp.id
相關文章
相關標籤/搜索