At first – Im sql newbie, sorry for this (mbe typicall) question.
I Have two table: table of organisations…
id_org org_name
1 Organiz1
2 Organiz2
and table of organization staff.
id_staff staff_name id_org
1 John 1
2 Jack 1
3 Sally 1
4 Peter 1
5 Andy 2
6 Joe 2
I want sql answer(two rows) like this
1 Organiz1 1 John 2 Jack 3 Sally 4 Peter
2 Organiz2 5 Andy 6 Joe
and I want what each name or id of staff will be named as staff_1_name(staff_2_name,staff_3_name) and staff_1_id.
How I can get it?
1 Answer