group_concat in mysql example

group_concat in mysql example

CITY_ID CITY_NAME STATE_NAME
1 Bhopal MP
2 Indore MP
3 Delhi DELHI
4 Allahabad UP


SELECT group_concat(concat(`city_id`,'@@', `city_name`,'@@', `state_name`),'###') as city FROM `city`


Result

1@@Bhopal@@MP###,2@@Indore@@MP###,3@@Delhi@@DELHI###,4@@Allahabad@@UP###

Comments

Popular posts from this blog

Call PHP Function In JavaScript Using Ajax

List of Post Category Wise in wordpress