I wrote this query on my education database, I have a small database on sql that each student related with a Person table with personid and I want to read all the FullName of the students that their register date is equal to 2024/04/02.
select t1.FullName from edu.Person t1 left join edu.Student t2 on t1.PersonId = t2.PersonId where t2.RegisterDate = '2024/04/02'
but I could not the differences between the query that have register date in the join :
``select t1.StudentUniId
from edu.Person t1
left join edu.Student t2 on t1.PersonId = t2.PersonId and t2.RegisterDate = '2024/04/02'`
I want to get the same result from putting condition in the where and join section of my query.
Is there any way to write a condition is equal to put condition in the where clause ? and if there is which way has a better performance ?
Fatemeh Rostamipour is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.