亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 1717 | 回復(fù): 1
打印 上一主題 下一主題

oracle for the lazy people (1) [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2005-01-01 04:15 |只看該作者 |倒序?yàn)g覽
Have Oracle to write what you want.

Example 1)

If you want to create a table but do not know how, have oracle write the SQL for you.

-----
set long 4000
set pagesize 0
connect scott/tiger
select dbms_metadata.get_ddl('TABLE', 'EMP')
from dual;
-----

The SQL will return the SQL that creates the emp table in scott's schema.  Learn the SQL, modifiy and use it in your own work.

  CREATE TABLE "SCOTT"."EMP"
   (    "EMPNO" NUMBER(4,0) NOT NULL ENABLE,
        "ENAME" VARCHAR2(10),
        "JOB" VARCHAR2(9),
        "MGR" NUMBER(4,0),
        "HIREDATE" DATE,
        "SAL" NUMBER(7,2),
        "COMM" NUMBER(7,2),
        "DEPTNO" NUMBER(2,0)
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "DATA"

Example 2)

Show us how scott  create the index on his emp table.
-----
set long 4000
set pagesize 0
select dbms_metadata.get_dependent_ddl('INDEX', 'EMP', 'SCOTT')
from dual;
-----

Example3)

Show us how tablespace data is created:

-----
set long 4000
set pagesize 0
select dbms_metadata.get_ddl('TABLESPACE', TABLESPACE_NAME)
from dba_tablespaces
where tablespace_name = 'DATA';
-----

  CREATE TABLESPACE "DATA" DATAFILE
  '/oracle/920/oradata/db920/data_1.dbf' SIZE 10485760 REUSE
  AUTOEXTEND ON NEXT 4096 MAXSIZE UNLIMITED
  LOGGING ONLINE PERMANENT BLOCKSIZE 4096
  EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT MANUAL

Now you can start to learn what is means, modify it and use it in your own work.

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2005-01-01 04:21 |只看該作者

oracle for the lazy people (1)

Exampe 1) and 2)
connect scott/tiger
Example 3)
connect / as sysdba
if you remove the "where" clause you get the DDLs for all tablespaces in the system.
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP