当前位置:网站首页>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
边栏推荐
- Flume configuration 4 - customize mysqlsource
- Use of kubesphere configuration set (configmap)
- Last words record
- Good documentation
- Azkaban实战
- Design and practice of kubernetes cluster and application monitoring scheme
- The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
- Why is this an undefined behavior- Why is this an undefined behavior?
- Use UDP to send a JPEG image, and UPD will convert it into the mat format of OpenCV after receiving it
- d3js小记
猜你喜欢
Flume configuration 4 - customize mysqlsource
Azkaban安装部署
this+闭包+作用域 面试题
Design and implementation of high availability website architecture
Zabbix
Spoon inserts and updates the Oracle database, and some prompts are inserted with errors. Assertion botch: negative time
[105] Baidu brain map - Online mind mapping tool
College Students' innovation project management system
Why are there fewer and fewer good products produced by big Internet companies such as Tencent and Alibaba?
SQL performance optimization skills
随机推荐
【LeetCode】404. Sum of left leaves (2 brushes of wrong questions)
2.常见的请求方法
返回二叉树中两个节点的最低公共祖先
Eight days of learning C language - while loop (embedded) (single chip microcomputer)
The database and recharge are gone
Anchor free series network yolox source code line by line explanation four (a total of ten, ensure line by line explanation, after reading, you can change the network at will, not just as a participan
Azkaban actual combat
Kuboard
Bumblebee: build, deliver, and run ebpf programs smoothly like silk
Comparison of advantages and disadvantages between platform entry and independent deployment
Yyds dry goods inventory intelligent fan based on CC2530 design
Vb+access hotel service management system
Mongodb common commands
The latest blind box mall, which has been repaired very popular these days, has complete open source operation source code
Design and practice of kubernetes cluster and application monitoring scheme
ELFK部署
Pat grade a 1119 pre- and post order traversals (30 points)
Design of KTV intelligent dimming system based on MCU
Medusa installation and simple use
Utilisation simple de devtools