I have a table called marks. sample data from my table is given below. In my table the subject field is dynamic, name and number of subject may vary based on the class.
ID Name Subject Marks
------ --------- ---------- ---------
1001 John Maths 78
1001 John English 88
1001 John Computer 92
1002 Mary Maths 81
1002 Mary English 85
1002 Mary Computer 90
How can I get an out put of the above table data in below format. I don't know whether this is a simple question, i am beginner in SQL and developing field. Please help.
ID Name Maths English Computer
---- -------- --------- --------- ------------
1001 John 78 88 92
1002 Mary 81 85 90