当前位置:网站首页>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 边栏推荐
- LeetCode 234. Palindrome linked list
- Sqoop command
- 2. Common request methods
- Bumblebee: build, deliver, and run ebpf programs smoothly like silk
- How to make OS X read bash_ Profile instead of Profile file - how to make OS X to read bash_ profile not . profile file
- 2.常见的请求方法
- Master Fur
- The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
- Pat class a 1160 forever (class B 1104 forever)
- Hot knowledge of multithreading (I): introduction to ThreadLocal and underlying principles
猜你喜欢

Watch the online press conference of tdengine community heroes and listen to TD hero talk about the legend of developers

腾讯云,实现图片上传

Character painting, I use characters to draw a Bing Dwen Dwen

Design and implementation of community hospital information system

Hot knowledge of multithreading (I): introduction to ThreadLocal and underlying principles

2. Common request methods

Share the newly released web application development framework based on blazor Technology

问题解决:AttributeError: ‘NoneType‘ object has no attribute ‘append‘

Talk about the SQL server version of DTM sub transaction barrier function

Elfk deployment
随机推荐
問下,這個ADB mysql支持sqlserver嗎?
Good documentation
Comparison of advantages and disadvantages between platform entry and independent deployment
为什么腾讯阿里等互联网大厂诞生的好产品越来越少?
Avoid material "minefields"! Play with super high conversion rate
Character painting, I use characters to draw a Bing Dwen Dwen
Pytest (4) - test case execution sequence
腾讯云,实现图片上传
Design and implementation of community hospital information system
端口,域名,协议。
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
问题解决:AttributeError: ‘NoneType‘ object has no attribute ‘append‘
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Une question est de savoir si Flink SQL CDC peut définir le parallélisme. Si le parallélisme est supérieur à 1, il y aura un problème d'ordre?
Port, domain name, protocol.
SPI and IIC communication protocol
SQL performance optimization skills
Cette ADB MySQL prend - elle en charge SQL Server?
Hot knowledge of multithreading (I): introduction to ThreadLocal and underlying principles
This + closure + scope interview question