回車
導出表數據(yes/no)
進入plsql
找到table那個大項
右鍵點中你所需要的那個表名
找到DBMS_Metadata
然後選項裡有ddl
彈出來那個窗口就是你的表結構
PLSQL裡
tools下
export user objects of
按shift批量選擇表
執行就行了
exp/imp工具
帶參數
rows=n —— 不帶數據的導出導入
只導出
exp user/pasword@dbServerName owner=user tables=(tb
連帶數據導出
exp user/pasword@dbServerName owner=user tables=(tb
imp user
或者
imp user
方法一
exp userid=scott/tiger owner=scott
imp userid=scott/tiger full=y indexfile=scott
……
more scott
REM CREATE TABLE
REM VARCHAR
REM INITRANS
REM GROUPS
REM
REM CREATE TABLE
REM VARCHAR
REM MAXTRANS
REM TABLESPACE
REM
REM CREATE TABLE
REM INITRANS
REM GROUPS
REM
REM CREATE TABLE
REM
REM
REM NUMBER(
REM STORAGE(INITIAL
REM
REM
REM CREATE TABLE
REM
REM STORAGE(INITIAL
REM
REM
…………
把前面的REM去了
方法二
set pagesize
set long
set feedback off
set echo off
spool get_allddl
connect USERNAME/PASSWORD@SID;
SELECT DBMS_METADATA
FROM USER_TABLES u;
SELECT DBMS_METADATA
FROM USER_INDEXES u;
spool off;
My Test:
set pagesize
set long
set feedback off
set echo off
spool get_allddl
connect username/password@database;
SELECT DBMS_METADATA
FROM USER_TABLES u where table_name =
spool off;
SET HEADING OFF;
SET ECHO OFF;
SET LONG
SPOOL D:\test
SELECT dbms_metadata
SPOOL OFF;
From:http://tw.wingwit.com/Article/program/Oracle/201311/17119.html