Hi. Well my computer exam is the day after tomorrow and while practicing previous year questions I came across this query. And sadly out teacher is not able to help out. It would be a great if you were to help out.
Well for now the solution I came accross is:
Query-1
Select roll from computer
Where Compmarks>50
Union
Select roll from mathematics
Where Mmarks>50;
Query-2
Select computer.roll
From computer, mathematics
Where computer.roll=mathematics.roll and mmarks>50 and Compmarks>50;
Let me know if there is other proper syntax. And thenks for showing interest.
should you use JOIN ?
should you use WHERE clause
instead of where clause can you use join = table a Join table b ON a.Marks > 50
what should you use WHY and the benefits and downsides .. weighing the pros and cons
acceptable risks
I came across a problem on similar example. So in an another example the students has different rolls in Mathematics and computer table so when I'm trying to join the two tables based on a.roll=b.roll , the results that I'm getting is that the students with equal roll who got marks >50 only showing up, where i would like the result of roll of students in either table who got marks>50 to show up.
Could help me with that?
I mean i don't want to join based on a.roll=b.roll.