please tell me how i make a sql query for
selecting data's from a table where that data repeated 4 times in that column
remshadm
0
Newbie Poster
Recommended Answers
Jump to PostHi,
Aggregate functions cannot be used in WHERE clause directly. Instead you can apply HAVING clause to GROUP BY clause. Try this:SELECT Table1.Name, Count(Table1.Name) AS NumNames FROM Table1 GROUP BY Table1.Name HAVING NumNames=4;
This will select all occurrences of Table1.Name that appear four times in table1
…
All 4 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.