oracle基本语句

一、基本建表语句
create table GROUPINFO
(
  ID             VARCHAR2(32) not null,
  GROUP_TYPE     VARCHAR2(20),
  GROUP_NAME     VARCHAR2(255) not null,
  MAINTAIN_LEVEL NUMBER,
  CUSTOMER_NAME  VARCHAR2(20),
  CUSTOMER_TEL   VARCHAR2(20)
)
tablespace EOMS_DB
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 128K
    minextents 1
    maxextents unlimited
  );

二、添加primary key

alter table GROUPINFO
  add primary key (ID)
  using index 
  tablespace EOMS_DB
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );

你可能感兴趣的:(oracle)