I have a table with columns name
and email
. The table has 10 records. I want to send an email for all the records. What is the query for that?
Asked
Active
Viewed 96 times
-3

sstan
- 35,425
- 6
- 48
- 66

parshu arukuta
- 1
- 1
-
Your question title will achieve the same functional result as the DISTINCT statement. But the latter spares you from having to use aggregates unnecessarily. http://stackoverflow.com/questions/164319/is-there-any-difference-between-group-by-and-distinct – ne1410s Dec 06 '14 at 07:38
2 Answers
0
Try this:
SELECT CONCAT(DISTINCT email, ';')
FROM emp
Will output like: abc@gmail.com;pqr@yahoo.com... in one column

SMA
- 36,381
- 8
- 49
- 73