this the code I got, but I feel that is doesn't make any sence.. if the "product" table…
Jump to turn (16)
- 1this the code I got, but I feel that is doesn't make any sence.. if the "product
- 2so if thats the case, as I asked, why is "product" (p) is the left side here? is
- 3but this query gave me no resuts, while the provios one I gave you have. what de
- 4but how is this logical that r is on the right and not p???
- 5does it metter, for either right join or left joinm wich tablwe is going to be f
- 6then isnt this syntex wrong? SELECT P.FirstName , P.LastName , E.HireDate , E.Jo
- 7i kip setting my difolt search engin to google and it kips going back to yahoo
- 8what is an "intiger", and what other types do we have?
- 9is there an if function in sql?
- 10how to create a new culomn using case when
- 11ERROR: more than one row returned by a subquery used as an expression
- 12ERROR: more than one row returned by a subquery used as an expression
- 13why does this : select COUNT() from Sales.SalesOrderHeader group by shipdate and
- 14this why did I got a single number (31,465) for this: select COUNT() from Sales.
- 15does that mean that all the vlues in the Status culomn had the same value, and c
- 16then what is the difference bwtween select SalesOrderID, COUNT(SalesOrderID) fro
- User
this the code I got, but I feel that is doesn't make any sence.. if the "product" table is on the "right join", why would it be on the left side of the "="? select p.productid, p.title from
review r right join product p on p.productid=r.productid where r.productid is null - Assistant
This query is selecting all products (p.productid and p.title) that do not have any reviews associated with them.
The 'right join' is used because we want to include all products in the result set, even if there are no reviews (which would not be included in a regular 'inner join'). The 'product' table is on the right because it is the table we want to make sure all records are included for.
The 'on p.productid=r.productid' condition is joining the two tables on their productid columns. This allows us to link each review to the product it is associated with.