本文介紹了兩種 SQL 連接表示法之間有什么區(qū)別?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!
問(wèn)題描述
SQL 1: select * from t1 join t2 on t1.f1 = t2.f2
SQL 2: select * from t1,t2 where t1.f1 = t2.f2
它們返回的結(jié)果是一樣的.它們之間有什么區(qū)別嗎?例如,在 DBMS 中如何運(yùn)行它們,或者在查詢計(jì)劃中?
The results that they return are same. Are there any differences between them? For example, in how the DBMS runs them, or in the query plan?
推薦答案
這兩個(gè)查詢?cè)诓僮魃蠜](méi)有區(qū)別.
There is no operational difference between the two queries.
然而,顯式連接符號(hào)是更好的學(xué)習(xí)和使用風(fēng)格;將另一個(gè)留給(尚未更改的)遺留代碼.
However, the explicit join notation is the better style to learn and use; leave the other for (as yet unchanged) legacy code.
這篇關(guān)于兩種 SQL 連接表示法之間有什么區(qū)別?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!