oracle建表语句模板

这段内容描述了如何创建一个名为BOI_INST_ORDER的数据库表,用于存储委托订单信息。表包含如委托编码、产品编码、策略代码、交易方向、资产受托人信息、投资资产详情、委托状态、金额、份额等关键字段,并设置了主键约束和注释。此外,还定义了存储参数和索引设置。
摘要由CSDN通过智能技术生成
-- Create table
create table BOI_INST_ORDER
(
  code              string,
  inst_code         string,
  fund_code         string,
  strategy_code     string,
  cash_account_code string,
  trade_type        string,
  advisor_code      string,
  advisor_name      string,
  symbol            string,
  secu_code         string,
  secu_name         string,
  status            string,
  amt               decimal(15,2),
  vol               decimal(15,2),
  investment_date   decimal(13),
  remark            string,
  create_user       string,
  update_user       string,
  create_time       string,
  update_time       string,
  exec_code         string
)
tablespace TBS_COI
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );
-- Add comments to the table 
comment on table BOI_INST_ORDER
  is '委托表';
-- Add comments to the columns 
comment on column BOI_INST_ORDER.code
  is '委托编码';
comment on column BOI_INST_ORDER.inst_code
  is '指令编码';
comment on column BOI_INST_ORDER.fund_code
  is '产品编码';
comment on column BOI_INST_ORDER.strategy_code
  is '策略代码';
comment on column BOI_INST_ORDER.cash_account_code
  is '账户代码';
comment on column BOI_INST_ORDER.trade_type
  is '交易方向';
comment on column BOI_INST_ORDER.advisor_code
  is '资产受托人代码';
comment on column BOI_INST_ORDER.advisor_name
  is '资产受托人名称';
comment on column BOI_INST_ORDER.symbol
  is 'SYMBOL';
comment on column BOI_INST_ORDER.secu_code
  is '投资资产编码';
comment on column BOI_INST_ORDER.secu_name
  is '投资资产名称';
comment on column BOI_INST_ORDER.status
  is '委托状态';
comment on column BOI_INST_ORDER.amt
  is '委托金额';
comment on column BOI_INST_ORDER.vol
  is '委托份额';
comment on column BOI_INST_ORDER.investment_date
  is '投资执行日';
comment on column BOI_INST_ORDER.remark
  is '备注';
comment on column BOI_INST_ORDER.create_user
  is '创建用户';
comment on column BOI_INST_ORDER.update_user
  is '修改人';
comment on column BOI_INST_ORDER.create_time
  is '创建时间';
comment on column BOI_INST_ORDER.update_time
  is '修改时间';
comment on column BOI_INST_ORDER.exec_code
  is '成交编码';
-- Create/Recreate primary, unique and foreign key constraints 
alter table BOI_INST_ORDER
  add primary key (CODE)
  using index 
  tablespace TBS_COI
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    next 1M
    minextents 1
    maxextents unlimited
  );

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值