Click here to Skip to main content
15,893,814 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have two tables registration in which username is one column and second i have result as my table and total as my column.as soon i register myself it gets stored in registration table and some value when i run the application ,that gets stored in result table.when the username is stored ,simultaneoussly the total column is stored in result table.

now i want to display the result of the entered username.

if i enter the username the particular value of that user should match with that particular row in result table.once i find the row of the username that should match with the row of result table.
what query i need to use.

is it some outer join.
plz give me the query.
Posted

SQL
SELECT * from result
FULL OUTER JOIN  registration
ON registration.ID = result.registrationID 
WHERE registration.username='"+TextBox1.Text+"'
 
Share this answer
 
v4
U have to maintain the "userid" column in both table.


SQL
select * from registation t1,result t2 where t1.username='"+TextBox1.Text+"'  and t1.userid=t2.userid
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900