Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fe93f48

Browse files
join优化
1 parent 460c036 commit fe93f48

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎mysql开发技巧一/join优化‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ join从句:: inner | full outer | left outer | right outer | cross
88

99

1010

11+
********************************************************************************
12+
left join 以左表为基础 查询
13+
忽然想起来有次面试问我如何用left join实现not in的功能 = =
1114

15+
select A.内容,B.内容 from A left join B ON a.key=b.key where b.key is null
1216

13-
17+
not in 关键字不会使用索引 所以用left join加上关键字为null查找只存在于A表不存在于B表的数据
1418

1519

1620

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /