Questions tagged [right-join]

The RIGHT JOIN keyword will return all the rows from the right table, even if there are no matches in the left table.

SQL RIGHT JOIN ON returns the rows of INNER JOIN ON plus unmatched right table rows extended by NULLs. A consequence is that it returns all the rows from the right table at least once even if there are no matches in the left table. See examples here.

233 questions
-2
votes
4 answers

Mysql request SELECT with LEFT JOIN

I am a beginner in MySQL, I had some courses in mysql that are now finished, I have a homework , provided by our teacher, to make for my training but I block to retrieve data from the base for a social network site. I understand the basis of JOIN…
-2
votes
1 answer

How to do a right outer join in MySQL?

'SELECT * FROM (SELECT * FROM t1 RIGHT OUTER JOIN t2 ON t1.wid = t2.wid WHERE t2.wid IS NULL) LIMIT ' . $number; This SQL lines do not give not one row back and I do not know the reason. The t1 is full of rows while…
Karmen
  • 238
  • 2
  • 15
-2
votes
1 answer

Mysql join practices use LEFT JOIN and INNER JOIN only?

As I am reading about joins I realize that only two of those are in work as others are just the same. Am I correct? INNER JOIN = JOIN LEFT JOIN = LEFT OUTER JOIN Are there any joins that you actually use?
Alexander T.
  • 1,401
  • 2
  • 9
  • 11
-3
votes
2 answers

is there a way to make a join like that?

I have to table first one type nbD PC 2 second one type nbF PC 3 TAB 2 and I want to have something like that type nbD nbF PC 2 3 TAB null 2
kahlaoui
  • 1
  • 1
-3
votes
2 answers

Group By with Right Outer Join

need to combine group-by and right-outer-join. TableA has groups "a", "b", "c", "d" TableB has: 12|a, 2|b, 1|a 5|b 3|d several times. I group TableB as view by the group like this: ViewB: 13|a 7|b 3|d As you can see, group "c" is not in the…
-4
votes
2 answers

How to join two tables using mysql

It's been so long since I did any Mysql queries I forgot how to do basic joins. I have two tables: Orders_ and Members I need to create one view which displays all the orders with the associated Email and…
user990717
  • 470
  • 9
  • 18
-5
votes
2 answers

Order of join operations: would these two FROM clauses produce the same results?

Would these two FROM clauses produce the same results? And if not, is there a way to write the the first one so that no parenthesis are needed? FROM SALESTAX RIGHT JOIN ( ITEMS RIGHT JOIN ( …
Brandon Moore
  • 8,590
  • 15
  • 65
  • 120
-5
votes
1 answer

mysql Left,right join not return null values

sql code: SELECT * from propertyfield as pf RIGHT JOIN property as p ON (pf.pfid = p.propID) not return null values or SELECT * from propertyfield as pf RIGHT JOIN property as p ON (pf.pfid = p.propID) where p.propID is null not return null…
Cesur APAYDIN
  • 806
  • 3
  • 11
  • 24
1 2 3
15
16