目录视图与信息模式 [英] Catalog Views vs Information Schema

查看:59
本文介绍了目录视图与信息模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。我想编写一个SQL脚本来获取有关数据库表,每个表的列以及存储在每行x col中的数据的信息,而不事先了解数据库。程序只会从我那里获取服务器和数据库名称,其余的将是自动化过程。这可能使用INFORMATION_SCHEMA或目录视图吗?还有什么指示?在此先感谢。

Hello. I want to write a SQL script to get information about a database's tables, columns of each tables and the data stored in each row x col without knowing anything about a database beforehand. The program will only get the server and database name from me and the rest will be automated process. Is this possible using either INFORMATION_SCHEMA or Catalog Views? Any further pointers? Thanks in advance.

推荐答案

Certenly。管理视图和帮助程序存储过程可以告诉您有关数据库模式和数据的任何信息。因为你可以运行动态sql,你甚至可以进行语义分析。

但是有现成的工具可以使用/或咨询。
Certenly. Administrative views and helper stored procedures can tell anything about the database schema and data you have. And as you can run dynamic sql you can even do semantic analysis.
But there are ready-made tools for this you can use / or consult.


这篇关于目录视图与信息模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆