14,970
edits
| Line 283: | Line 283: | ||
* MySQL: | * MySQL: | ||
** Using {{kbd | key =CONCAT}} for multiple column ex: column_1, column_2 | ** Using {{kbd | key =CONCAT}} for multiple column ex: column_1, column_2 | ||
<pre> | <pre> | ||
SELECT tmp.key FROM | SELECT tmp.key FROM | ||
| Line 292: | Line 292: | ||
) tmp | ) tmp | ||
WHERE tmp.count >=2 | WHERE tmp.count >=2 | ||
</pre> | |||
For counting purpose: find the count of repeated id (type: int) between table_a and table_b | |||
<pre> | |||
SELECT count(DISTINCT(id)) FROM table_a WHERE id IN | |||
( | |||
SELECT DISTINCT(id) FROM table_b | |||
) | |||
</pre> | </pre> | ||