简体   繁体   English

如何检查不同字段的多个mysql表中是否存在数据

[英]how to check whether a data exists in multiple mysql tables on different fields

I have two tables named A and B我有两个名为 A 和 B 的表

table A- id1 id2 id3 id4表 A- id1 id2 id3 id4

table B- id5 id6 id7 id8表 B- id5 id6 id7 id8

I want to check whether a data exists in table A on field id1 or in table B on fields id6 or id7我想检查字段 id1 的表 A 或字段 id6 或 id7 的表 B 中是否存在数据

Multiple options exist for sub-string search in MySQL MySQL 中存在多个用于子字符串搜索的选项

  • One often overlooked option: if you are using or have access to a database client, such as Navicat, you can use the Find in database ... search一个经常被忽视的选项:如果您正在使用或有权访问数据库客户端,例如 Navicat,您可以使用Find in database ...搜索
  • There are other options as well as indicated in the see also links还有其他选项以及参见链接中的指示

See also也可以看看

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM