There is a table called contacts
with columns id, name, address, ph_no
etc.
I need to find out rows with the same name
, if the rows count is more than 1, show those rows.
For example:
Table: contacts
id--------name--------address---------ph_no--------
111 apple U.K 99*******
112 banana U.S 99*******
123 grape INDIA 99*******
143 orange S.AFRICA 99*******
152 grape KENYA 99*******
For the above table I need to get rows with same column name
data like the below:
id--------name--------address---------ph_no--------
123 grape INDIA 99*******
152 grape KENYA 99*******
I need to get the rows based on the name what I given as argument like below example
syntax:
select * from contacts where name='grape' and it's count(*) >1 return those rows.
How can I achieve the solution for above problem.