问题描述
在Oracle SQL Developer中,每个表都有一个"SQL"选项卡.此选项卡包含重新创建表所需的大多数SQL代码(CREATE TABLE
,CREATE TRIGGER
等).
In Oracle SQL Developer, there's a "SQL" tab for each table. This tab contains most of the SQL code (CREATE TABLE
, CREATE TRIGGER
, etc) that's needed to recreate the table.
此信息是从数据库系统中以编程方式提供的,还是SQL Developer的应用程序功能?如果是前者,我需要运行哪些命令/语句来检索此信息?如果是更高版本,是否有任何聪明的方法可以使SQL Developer导出这些语句?
Is this information available programatically from the database system, or is this an application feature of SQL Developer? If the former, what commands/statements would I need to run to retrieve this information? If the later, are there any clever ways to get SQL Developer to export these statements?
推荐答案
如果您使用的是Oracle 9i +,那么您正在寻找DBMS_METADATA软件包. http://download.oracle.com/docs/cd/B10500_01/appdev.920/a96612/d_metada.htm .它将允许您提取所需的任何DDL.
If you are using Oracle 9i+ then you are looking for the DBMS_METADATA package. http://download.oracle.com/docs/cd/B10500_01/appdev.920/a96612/d_metada.htm. It will allow you to extract whatever DDL you want.
如果您要查找更具体的信息,则可以访问大量视图,以获取类似于@Quassnoi给出的特定数据元素的视图.
If you are looking for more specific information there is a whole host of views you can access for specific data elements similar to the ones given by @Quassnoi.
这篇关于在Oracle中创建表反向工程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!