Let's say we have two (2) table, the STUDENT and GRADE table and we are going to display all students with grades only. We'll exclude those students who have not given any grades yet.
Table:
STUDENT |
GRADE |
Using the natural join, the query will automatically look for the common column on both tables so make sure that there is only one (1) common attribute to avoid wrong results.
Query:
select * from student natural join grade
Output:
0 comments:
Post a Comment