apssiva
apssiva

Reputation: 23

How to join two table and update the table?

table1:

id,studname,course

1,AAA,EnglishI
1,AAA,Basic programming 
1,AAA,EnglishII
1,AAA,Maths
2,BBB,programming
2,BBB,IT Essential
2,BBB,Maths

table2:

1,AAA,(EnglishI,Basic programming,EnglishII,Maths)-serialization
2,BBB,(programming, IT Essential, Maths)

how? kindly help me..

Upvotes: 0

Views: 392

Answers (1)

Mārtiņš Briedis
Mārtiņš Briedis

Reputation: 17762

Try this:

SELECT id, studname, GROUP_CONCAT(course) FROM table GROUP BY studname

Upvotes: 1

Related Questions