gpt4 book ai didi

sql - 拥有 sys.objects 和 sys.columns 时需要 information_schema

转载 作者:行者123 更新时间:2023-12-04 02:39:44 24 4
gpt4 key购买 nike

information_schema 目录 View 需要什么,因为它们提供与(sys.objects 和 sys.columns)相同的详细信息。

information_schema.tables----->retrives from sys.objects.
information_schema.column----->retrives from sys.columns.

最佳答案

information_schema... 是 ANSI 兼容 View ,其他 RDBMS 系统也有这些 View ,如 MySQL、postgreSQL、SQLite。 sys.columns 只存在于 SQL Server 中

PostgreSQL:http://www.postgresql.org/docs/current/interactive/information-schema.html

MySQL:http://dev.mysql.com/doc/refman/5.7/en/information-schema.html

SQLite:http://www.sqlite.org/cvstrac/wiki?p=InformationSchema

另一方面,Oracle 没有这些 View ,但有它们自己的版本,如 ALL_TABLESALL_TAB_COLUMNS

关于sql - 拥有 sys.objects 和 sys.columns 时需要 information_schema,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20157559/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com