简体   繁体   English

如何通过odbc从Progress数据库获取表模式

[英]How to get table schema from Progress database via odbc

I have a linked server set up between sql 2008 and a Progress OpenEdge 10.1b server. 我在sql 2008和Progress OpenEdge 10.1b服务器之间设置了链接服务器。

How do I get the table schemas? 我如何获得表模式?

You can get all available tables: 您可以获得所有可用的表:

select * from sysprogress.SYSTABLES;

or 要么

select * from sysprogress.SYSTABLES_FULL;

You can get all columns of specified table: 您可以获取指定表的所有列:

select * from sysprogress.SYSCOLUMNS where TBL = 'table_name';

or 要么

select * from sysprogress.SYSCOLUMNS_FULL where TBL = 'table_name';

It works only with DBA privileged user. 它仅适用于DBA特权用户。

More detail in OpenEdge Product Documentation: https://community.progress.com/community_groups/openedge_general/w/openedgegeneral/1329.openedge-product-documentation-overview OpenEdge产品文档中的更多详细信息: https//community.progress.com/community_groups/openedge_general/w/openedgegeneral/1329.openedge-product-documentation-overview

Document title: SQL Reference 文档标题: SQL参考

Chapter: OpenEdge SQL System Catalog Tables 章: OpenEdge SQL系统目录表

You can do a statement like 你可以这样做一个声明

SELECT * FROM LinkedProgressOpenedgeServer.YourDatabase.Owner.TableName WHERE 1=2

That should return just the schema without any data. 这应该只返回没有任何数据的模式。

Normally the default schema name is PUB. 通常,默认架构名称为PUB。 You can try using PUB schema. 您可以尝试使用PUB架构。

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

相关问题 从 prisma 中的表中获取模式 - Get the schema from table in prisma 如何在不更改其中数据的情况下将表的模式从一个数据库导入到另一个数据库中的现有表? - How can i import a schema of a table from one database to an existing table in another without altering the data in it? 如何使用Rails获取MongoDB数据库的模式 - How to get the schema of a MongoDB database with Rails 如何在实体框架中获取表的架构名称? - How to get the Schema name of a Table in Entity Framework? 如何对从另一个架构复制的表进行分区? - How to partition a table copied from another schema? 如何在 MySQL 数据库中显示表的架构? - How do I show the schema of a table in a MySQL database? 如何使用NHibernate模式生成更新数据库表模式? - How to update database table schemas with NHibernate schema generation? 如何在schema.rb中的数据库表中添加attr_accessible - how to add attr_accessible to database table in schema.rb 从表中区分模式? - Differentiate a schema from a table? 如何从 PySpark 中的数据帧获取模式定义? - How to get the schema definition from a dataframe in PySpark?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM