MySQL Forums
Forum List  »  General

retrieving data from 2 tables
Posted by: ahmed tayeb
Date: April 27, 2005 09:44AM

hello

How can i do some thing like this :

i have 2 tables

1- information about the student ==> the Key = ID
2- information about his grades ==> the same key = ID

-------------------
ID |name |Section |
-------------------
5 |ahmed | SD
4 |hamad | SB


--------------------------
ID |Score | grade | Course
--------------------------
5 | 80 | B | Math 101
4 | 70 | C | Math 101
5 | 65 | D+ | Math 102
4 | 75 | C+ | Math 102


I want to search about Student ID = 5
Result :

ID = 5 name = ahmed
--------------------------------
Course | Score | Grade
--------------------------------
Math 101| 80 | B
Math 102| 65 | D+

Options: ReplyQuote


Subject
Written By
Posted
retrieving data from 2 tables
April 27, 2005 09:44AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.