Hello Everyone,
I have 2 sampel tables something like this :
Table : UserInfo
Email - PK
Name
Address
Table : UserRegistration
Email - FK
Course
Sample Data for UserInfo
harsimrat@........ , Harsimrat Thukral ,Some Street
data for UserRegistration
harsimrat@....... , CS 101
harsimrat@.......,CS 201
harsimrat@......., CS401
Now If I say something like this
SELECT * FROM UserInfo, UserRegistration
WHERE Email = 'hthukral@......'
It returns me 4 rows with repeated data, which is correct ....But I want to have somthing like this:
Columns : Name, Address, Email, Course1, Course 2, Course 3, Course 4
There can only be maximum of 4 courses, How can I get the desired results
Thanks,
Harsimrat Thukral