Hi,
I have a very simple question
How to implement a duplication check if the PRIMARY KEY is COMPOSITE key (name,email)
SELECT
name, email, COUNT(*)
FROM
users
GROUP BY
name, email
HAVING
COUNT(*) > 1
Hi,
I have a very simple question
How to implement a duplication check if the PRIMARY KEY is COMPOSITE key (name,email)
SELECT
name, email, COUNT(*)
FROM
users
GROUP BY
name, email
HAVING
COUNT(*) > 1
Hi @mik_q3,
Thanks for asking. I think this PR should implement exactly what youโre looking for. Take a look and like the PR if it would be helpful for you.
While youโre waiting for that PR to get into a release, try this workaround:
SELECT
CONCAT(name, email) AS helper_column_key,
name,
email
FROM
users
;
CONCAT(COALESCE(name,"Blank"),COALESCE(email,"Blank"))
for dealing with NULLs etc.