Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÔÚOracleÊý¾Ý¿â´´½¨½Å±¾ÖÐÈçºÎ³õʼ»¯Ä³Ð©±í

Sample
±í¿Õ¼ä£ºIMPTEMP
±í£ºRoles ¡¢Users
ͨ¹ýPL/SQLµ¼³öµÄÊý¾Ý¿â½Å±¾
-----------------------------------------------------
-- Export file for user IMPTEMP                    --
-- Created by Administrator on 2010-1-29, 14:14:25 --
-----------------------------------------------------
spool sample.log
prompt
prompt Creating table ROLES
prompt ====================
prompt
create table IMPTEMP.ROLES
(
  ROLENAME NVARCHAR2(50) not null,
  ROLEXML  NCLOB
)
tablespace IMPTEMP
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );
alter table IMPTEMP.ROLES
  add constraint ROLES_PRIMARY_KEY primary key (ROLENAME)
  using index
  tablespace IMPTEMP
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );
prompt
prompt Creating table USERS
prompt ====================
prompt
create table IMPTEMP.USERS
(
  USERID   NVARCHAR2(50) not null,
  USERNAME NVARCHAR2(50),
  ROLENAME NVARCHAR2(50),
  PASSWORD NVARCHAR2(50),
  USERXML  NCLOB,
  USERDN   NVARCHAR2(100),
  ISLOCAL  NUMBER(1)
)
tablespace IMPTEMP
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );
comment on column IMPTEMP.USERS.ISLOCAL
  is '0-ISNOTLOCAL  :  1-ISLOCAL';
alter table IMPTEMP.USERS
  add constraint USERS_PRIMARY_KEY primary key (USERID)
  using index
  tablespace IMPTEMP
  pctfree 10
  initrans 2
 


Ïà¹ØÎĵµ£º

oracle ±í¿Õ¼ä²Ù×÷

oracle±í¿Õ¼ä²Ù×÷Ïê½â
  1
  2
  3×÷Õߣº   À´Ô´£º    ¸üÐÂÈÕÆÚ£º2006-01-04 
  5
  6 
  7½¨Á¢±í¿Õ¼ä
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

Oracle·¢²¼SunµÄ¸÷Ïî²úÆ·µÄδÀ´µÄFAQÁбí


Ô­·¢±íÓÚhttp://saharabear.javaeye.com
ͬʱ·¢±íÔÚÕâÀï.
²»ÐèÒªÏàÐÅÉÌÒµÉϵÄÈκγÐŵ,²»¹ýÈκεĹٷ½FAQ¶¼»áÓвο¼¼ÛÖµ,ÕâÀï
ÊÇOracle·¢²¼µÄÕë¶ÔSunµÄ¸÷Ïî²úÆ·µÄһЩ˵Ã÷µÄFAQ,»ù±¾ÉÏÃèÊöÁ˶ÔGlassfish¼ÌÐøÖ§³Ö,¶ÔNetbeans¼ÌÐø¿ª·¢µÄ̬¶È,²»¹ý,kenai.com,ΰ´óµÄ"ÎÒÃDz»½ö½öÊÇ´úÂëÍйÜ"µÄÉç½»ÐÔ¿ª·¢Õ¾µã,»ù± ......

Oracle Óαê Cursor ʹÓÃ

create or replace procedure getok
as
cursor mycur is select ids,name from aaa where name not in (select names from ok);
vempno aaa.ids%type;
vename aaa.name%type;
begin
open mycur;
loop
fetch mycur into vempno,vename;
exit when mycur%notfound;
if mycur%found then
    insert ......

oracleÖØÔØ²Ù×÷·ûµÄÀý×Ó

ת×Ô£ºhttp://download.oracle.com/docs/cd/B13789_01/server.101/b10759/statements_6004.htm
Creating User-Defined Operators: Example
This example creates a very simple functional implementation of equality and then creates an operator that uses the function:
CREATE FUNCTION eq_f(a VARCHAR2, b VARCHA ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ