Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql select in where clause for when more than one records exists

SELECT *
FROM tableName
WHERE columnName IN (SELECT *
                        FROM (SELECT columnName
                              FROM tableName
                              GROUP BY columnName
                              HAVING COUNT(columnName) > 1)
                        AS someLabel);
Source by dba.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #sql #select #clause #records #exists
ADD COMMENT
Topic
Name
2+7 =