Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in SQL by (55.5k points)

Can anyone explain SQL join with where clause using an example?

1 Answer

0 votes
by (119k points)

For example, you have Students table and Marks tables like this:

Students Table

Marks Table

 

Where clause is used to filter the result-set. You can join these two tables on s_id (student id) columns to find the Student Names who scored more than 90 and their scores by using this query:

SELECT s_name, score

FROM Student S

INNER JOIN Marks M on

S.s_id = M.s_id

WHERE score > 90

 

The above query gives the following result:

 

I recommend enrolling in this SQL Training course by Intellipaat to learn writing complex SQL queries.

Related questions

0 votes
1 answer
asked Jul 17, 2019 in SQL by Tech4ever (20.3k points)
+3 votes
1 answer
asked Jul 3, 2019 in SQL by Tech4ever (20.3k points)
0 votes
0 answers
asked Dec 29, 2020 in SQL by biscottob (120 points)

Browse Categories

...