亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

java - 這個(gè)sql為什么沒(méi)加where關(guān)鍵詞還多加了一個(gè)and ,照樣能運(yùn)行查出數(shù)據(jù),沒(méi)有報(bào)錯(cuò)呢?
迷茫
迷茫 2017-04-18 10:30:54
0
9
530

這樣寫并沒(méi)有報(bào)錯(cuò),而且可以查出想要的數(shù)據(jù)

SELECT
    a.*, b.sj_name,
    c.hy_name
FROM
    qdwyc_dd a
LEFT JOIN qdwyc_hy_sj b ON a.dd_jdr = b.id
JOIN qdwyc_hy_passenger c ON a.dd_xdr = c.id
AND dd_num LIKE '%94%'
迷茫
迷茫

業(yè)精于勤,荒于嬉;行成于思,毀于隨。

reply all(9)
Ty80

Document
Differences between on and where filtering in mysql left join

巴扎黑

Join also supports multiple conditions

伊謝爾倫

There is the ON keyword, which is equivalent to the where keyword for left outer join query

大家講道理

It’s in-depth, I learned it in passing

洪濤

table1 left join table2 on + 查詢條件. You need to learn more SQL statements, the foundation is not solid enough...

Ty80

Correct answer upstairs, the poster needs to read more about the basics

PHPzhong

This and is connected with the condition after on, and is one of the conditions associated with the table. Basics............

劉奇

1. Join on followed by the and condition is the condition used when generating a temporary table. It will return the records in the left table regardless of whether the condition in on is true.

2. The where condition is the condition for filtering the temporary table after the temporary table is generated. At this time, there is no meaning of left join (the records of the left table must be returned). If the condition is not true, all will be filtered out.

洪濤

The basic part of SQL language includes inner joins, outer joins, and outer joins are divided into left outer joins, right outer joins, and complete outer joins. You can find it by looking at the basics of SQL language

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template