当前位置:网站首页>In MySQL Association query, the foreign key is null. What if the data cannot be found?
In MySQL Association query, the foreign key is null. What if the data cannot be found?
2022-07-05 03:07:00 【CSDN Q & A】
The foreign key is null Can you not associate the table , Change to normal query , Can it be realized ?
Take the answer :
The design concept of foreign key is to reasonably restrict the entry of data , Do not allow illegal data to be entered , When querying , There is no limit .
The data that the subject said cannot be found , Two tables should be directly executed join Caused by association , It is recommended to use left join Associate two tables , Common query ( Be sure to display the data ) The watch , Put it on the left side. , The table to be associated can be placed on the right :
select * from table_1 a left join table_2 b on a.key = b.key
边栏推荐
- 问下,这个ADB mysql支持sqlserver吗?
- When the low alcohol race track enters the reshuffle period, how can the new brand break the three major problems?
- Simple use of devtools
- 有個疑問 flink sql cdc 的話可以設置並行度麼, 並行度大於1會有順序問題吧?
- How to make OS X read bash_ Profile instead of Profile file - how to make OS X to read bash_ profile not . profile file
- Pytest (4) - test case execution sequence
- Asemi rectifier bridge 2w10 parameters, 2w10 specifications, 2w10 characteristics
- Logstash、Fluentd、Fluent Bit、Vector? How to choose the appropriate open source log collector
- Hot knowledge of multithreading (I): introduction to ThreadLocal and underlying principles
- 2021 Li Hongyi machine learning (1): basic concepts
猜你喜欢
Zabbix
Anchor free series network yolox source code line by line explanation Part 2 (a total of 10, ensure to explain line by line, after reading, you can change the network at will, not just as a participan
This + closure + scope interview question
Azkaban actual combat
C file in keil cannot be compiled
Pat grade a 1119 pre- and post order traversals (30 points)
Bumblebee: build, deliver, and run ebpf programs smoothly like silk
Design of KTV intelligent dimming system based on MCU
Design of kindergarten real-time monitoring and control system
qrcode:将文本生成二维码
随机推荐
Hmi-30- [motion mode] the module on the right side of the instrument starts to write
Character painting, I use characters to draw a Bing Dwen Dwen
Problem solving: attributeerror: 'nonetype' object has no attribute 'append‘
Bumblebee: build, deliver, and run ebpf programs smoothly like silk
看 TDengine 社区英雄线上发布会,听 TD Hero 聊开发者传奇故事
Flume configuration 4 - customize mysqlsource
How can we truncate the float64 type to a specific precision- How can we truncate float64 type to a particular precision?
Privatization lightweight continuous integration deployment scheme -- 01 environment configuration (Part 1)
Share the newly released web application development framework based on blazor Technology
d3js小记
Six stone programming: advantages of automated testing
El tree whether leaf node or not, the drop-down button is permanent
Sqoop command
Multi person online anonymous chat room / private chat room source code / support the creation of multiple chat rooms at the same time
Eight days of learning C language - while loop (embedded) (single chip microcomputer)
[daily problem insight] Li Kou - the 280th weekly match (I really didn't know it could be so simple to solve other people's problems)
Why is this an undefined behavior- Why is this an undefined behavior?
Moco V2 literature research [self supervised learning]
College Students' innovation project management system
Use of kubesphere configuration set (configmap)