Is a cross join with a where clause the same as an inner join with an ON clause?
The syntax of Teradata SQL is confusing me. Here is a simple Teradata query with two tables:
SELECT pno, hours, lName
FROM Employee, Works_on
WHERE employee.ssn = works_on.essn
There is no explicit join. A Cartesian Product is implied and the Where clause defines a filter on the results of that product, I think. In T-SQL I would use an explicit ON clause rather than the WHERE clause.
I can do this in T-SQL but it seems rather inefficient with the Cross Join:
SELECT pno, hours, lName
FROM Employee CROSS JOIN Works_on
WHERE employee.ssn = works_on.essn
This is how I would actually do it in T-SQL, with an explicit inner join
SELECT pno, hours, lName
FROM Employee INNER JOIN
Works_on
ON employee.ssn = works_on.essn