当前位置:网站首页>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 边栏推荐
- Asemi rectifier bridge 2w10 parameters, 2w10 specifications, 2w10 characteristics
- 2021 Li Hongyi machine learning (1): basic concepts
- [micro service SCG] 33 usages of filters
- SQL performance optimization skills
- How can we truncate the float64 type to a specific precision- How can we truncate float64 type to a particular precision?
- Qrcode: generate QR code from text
- Performance of calling delegates vs methods
- Jd.com 2: how to prevent oversold in the deduction process of commodity inventory?
- Apache build web host
- Problem solving: attributeerror: 'nonetype' object has no attribute 'append‘
猜你喜欢

Sqoop安装

VM in-depth learning (XXV) -class file overview

2021 Li Hongyi machine learning (2): pytorch

Ubantu disk expansion (VMware)

Class inheritance in C #

Jd.com 2: how to prevent oversold in the deduction process of commodity inventory?

Design and implementation of community hospital information system

Asemi rectifier bridge 2w10 parameters, 2w10 specifications, 2w10 characteristics

Avoid material "minefields"! Play with super high conversion rate

Design of KTV intelligent dimming system based on MCU
随机推荐
Accuracy problem and solution of BigDecimal
Master Fur
Acwing第 58 场周赛【完结】
Medusa installation and simple use
qrcode:将文本生成二维码
SQL performance optimization skills
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Devtools的简单使用
ELFK部署
Sqoop命令
问题解决:AttributeError: ‘NoneType‘ object has no attribute ‘append‘
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
College Students' innovation project management system
Apache build web host
Flume configuration 4 - customize mysqlsource
Port, domain name, protocol.
PHP cli getting input from user and then dumping into variable possible?
Share the newly released web application development framework based on blazor Technology
LeetCode146. LRU cache
Ubantu disk expansion (VMware)