查询是否存在已验证表

编程入门 行业动态 更新时间:2024-10-26 10:40:59
本文介绍了查询是否存在已验证表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个表 v_c_country 与列 table_name

I have table v_c_country with column table_name

我可以进行查询,并因此获得 table_names 列中所有表的列表.一般来说,这意味着.我把它作为另一个查询的来源.但是在 table_names 列表与原始存在表列表不同的情况下怎么办?来自information_schema.tables?(例如,我们准备有关未来将创建的表的信息).

I can make an query and, as result, have the list of all tables from column table_names. Generally, it means. I have it as source to another query. But what in situation when the list of table_names are different than list of original exists tables f.ex. from information_schema.tables? (f.ex. we prepare info about tables witch will be create in the future).

如何对表 v_c_country 进行查询,结果是 table_names 列表,但已使用 f.ex 进行验证.information_schema.tables?(仅列出真实存在的表的名称)请举例.

How to make a query on table v_c_country with result a list of table_names but verified with f.ex. information_schema.tables? (list only with names of real existing tables) Example pls.

推荐答案

select c.table_name from v_c_country c inner join INFORMATION_SCHEMA.TABLES i on i.TABLE_NAME = c.table_name

更多推荐

查询是否存在已验证表

本文发布于:2023-10-24 17:29:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1524560.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:是否存在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!