GROUP BY clause to get comma separated values ​​in sqlite

My table structure is like this using sqlite3

CREATE TABLE enghindi (eng TEXT,hindi TEXT) 

I have a table called enghindi in which there are two columns with the name Hindi , eng , I want to combine the entry of the eng column, and also combine the Hindi word with a comma

see below the table looks like

enter image description here

I want to do it below

enter image description here

I want to do this using sqlite3 query

+8
sql mysql sqlite sqlite3 android-sqlite
source share
1 answer

This should work:

 SELECT GROUP_CONCAT(eng), hindi FROM enghindi GROUP BY hindi; 
+11
source share

All Articles