Ответ 1
SELECT COUNT(*) FROM
(
SELECT id FROM table1 where col1 like '%abcd%'
intersect
SELECT id from table2 where col2 like '%efgh%'
) I
Как подсчитать результат этого запроса?
SELECT id FROM table1 where col1 like '%abcd%'
intersect
SELECT id from table2 where col2 like '%efgh%'
SELECT COUNT(*) FROM
(
SELECT id FROM table1 where col1 like '%abcd%'
intersect
SELECT id from table2 where col2 like '%efgh%'
) I