Home > database >  Consult the rowNum and left problems when you join to write with
Consult the rowNum and left problems when you join to write with

Time:09-22

1) SELECT
ROWNUM,
XXXXXB. * FROM (
SELECT
F.L NGDeptPLANDETAILID,
F.L NGDeptPLANID - plan ID department

Ft. IsWorkStandard isWorkstd

The FROM deptPLANDETAIL F
LEFT the JOIN FyitemType ft
ON F.L NGFYITEMTYPEID=ft. LngFyItemTypeId
WHERE F.L NGDeptPLANID=1707 ORDER BY F.L NGROWID
) XXXXXB;


2) SELECT
F.L NGDeptPLANDETAILID,
F.L NGDeptPLANID - plan ID department

Ft. IsWorkStandard isWorkstd

The FROM deptPLANDETAIL F
LEFT the JOIN FyitemType ft
ON F.L NGFYITEMTYPEID=ft. LngFyItemTypeId
WHERE F.L NGDeptPLANID=1707 ORDER BY F.L NGROWID;

The second sentence is to bring out the inside of the first sentence, but the query results isWorkstd, under the above 0 to 1,
1 is correct, could you tell me why
If change LEFT the JOIN to JOIN, just right, found out are 1, didn't understand, please explain the great spirit

CodePudding user response:

Nothing left the join is left to the right is only the left
, the join is the internal connection, both sides meet the join condition is the result

CodePudding user response:

reference 1st floor baidu_36457652 response:
left the join is left right no results, only left
, the join is the internal connection, both sides meet the join condition is the result of


Query two tables are the records of 1707

CodePudding user response:

And two sentences are left join query out only isWorkstd fields, other fields are the same
  • Related