Hi,
I just want to retrieve name of the employees who have two or more than two email_id in employee table. pls help me out..

Recommended Answers

All 2 Replies

select * from employees
group by employee_id
having count(employee_id) >= 2

your question is not clear

How are emails stored in table?
do you have separate columns to save each email ids
or they are saved in 1 columns

if email ids are saved in separate columns
then try

select * from table1 where
(email_column1 is not null and (email_column2 is not null or email_column3 is not null .....)

if email ids are saved in single column
then try

select *  from table1
where email_column1 like '%@%@%@%.........
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.