Manu's Blog
Search Results:
Tuesday, October 6, 2009
Query to find no of multiple columns
SELECT id, COUNT(id) AS NumOccurrences
FROM Driver_History
GROUP BY id
HAVING (COUNT(id) = 2)
This above query gives all the rows that have same id's.
No comments:
Post a Comment
Newer Post
Older Post
Home
View mobile version
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment