• 如何导出远程oracle数据库中的表结构


    从远程oracle数据库上导出指定表的表结构语句有两种方法:

    方法一:通过sql语句获得

    1,make sure that you can connect the remote database.

    2,enter into the sqlplus,and execute the command:


    select dbms_metadata.getddl('TABLE',tablename) from user_tables


    and you will get all the tables definition of the current user.

    通过该sql获得的结果集合是包含指定表的所有的ddl语句。包括create,alter,grant。产生的结果集是clob对象,点击查看其内容即可以获得表结构语句。

    方法二:通过sqldeveloper获得

    工具-->导出用户对象--->选择指定的表导出到指定的sql文件中

    用notpad++打开sql文件获得表结构语句和表的注释语句。注意这样导出的sql文件包含文件的所有者。在导出时要设置不包含所有者,只选择包含存储和单个文件这样导出的sql文件是纯粹的只包含表结构和表中列注释的sql文件。可以直接copy在本地创建相同表结构的表即可。

  • 相关阅读:
    浏览器检测
    EcmaScript基础
    js中的内置对象
    cursor 与refcursor及sys_refcursor的区别 (转载)
    各种连接数据方法的网站
    UVa11627 Slalom
    UVa1450 Airport
    UVa12124 Assemble
    UVa11384 Help is needed for Dexter
    UVa11464 Even Parity
  • 原文地址:https://www.cnblogs.com/moonfans/p/3855319.html
Copyright © 2020-2023  润新知