943,648 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 572
  • MySQL RSS
Aug 22nd, 2008
0

How to retrieve name who having two different email_id in the table?

Expand Post »
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..
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dharam_05 is offline Offline
22 posts
since Aug 2008
Aug 22nd, 2008
0

Re: How to retrieve name who having two different email_id in the table?

select * from employees
group by employee_id
having count(employee_id) >= 2
Reputation Points: 133
Solved Threads: 141
Veteran Poster
dickersonka is offline Offline
1,162 posts
since Aug 2008
Aug 22nd, 2008
0

Re: How to retrieve name who having two different email_id in the table?

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

MySQL Syntax (Toggle Plain Text)
  1. SELECT * FROM table1 WHERE
  2. (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

MySQL Syntax (Toggle Plain Text)
  1. SELECT * FROM table1
  2. WHERE email_column1 LIKE '%@%@%@%.........
  3.  
Reputation Points: 22
Solved Threads: 9
Junior Poster in Training
varmadba is offline Offline
83 posts
since Jun 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: how to integrate mysql database server with apache server
Next Thread in MySQL Forum Timeline: how to get mysql db file in webapps for connectivity





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC