
我要提取出三个表里面的每个字段,如A,B,C 表 公共字段为 P_ID
select a,b,c
from a,b,c
where ap_id = bp_id
and bp_id = cp_id
在Mysql 众多表中查找一个表名或者字段名的 SQL 语句:
SELECT table_name, column_name from information_schemacolumns WHERE column_name LIKE 'Name';
下面两种方法也可以查到:
红色代表可选项
SELECT column_name from information_schemacolumns WHERE (column_name LIKE ’%searchTerm%’ AND) table_schema = ‘yourDB’
SELECT column_name from information_schemacolumns WHERE (column_name LIKE ’%searchTerm%’ AND) table_schema = ‘yourDB’ AND table_name = ‘yourDBTable’
以上就是关于mysql怎么查询两个表的全部数据全部的内容,包括:mysql怎么查询两个表的全部数据、mysql中如何使用sql语句取出某个数据表中的所有字段、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)