少年阿宾

那些青春的岁月

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  500 Posts :: 0 Stories :: 135 Comments :: 0 Trackbacks
-- Create table
create table ABING1
(
  ID         INTEGER not null,
  CREATETIME DATE default sysdate not null,
  FIRSTNAME  NVARCHAR2(100) not null,
  LASTNAME   CLOB not null,
  MIDDLENAME NCLOB not null
)
tablespace USERS
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );
-- Create/Recreate primary, unique and foreign key constraints
alter table ABING1
  add constraint PK_ABING primary key (ID)
  using index
  tablespace USERS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );




create or replace procedure abin55(abing in varchar2,abin out sys_refcursor)
as
begin
declare
createtime date:=to_date(abing,'yyyy:MM:dd HH24:MI:SS');
cursor mycur is select * from abing1 t where t.createtime=createtime;
abin mycur%rowtype;
begin
open mycur;
loop
     fetch mycur into abin;
     exit when mycur%NOTFOUND;
end loop;
close mycur;
end;
end;
posted on 2012-08-15 00:57 abin 阅读(489) 评论(0)  编辑  收藏 所属分类: oracle

只有注册用户登录后才能发表评论。


网站导航: