首页 > 数据库技术 > 详细

Oracle Create,Delete,Alter

时间:2015-12-25 22:29:44      阅读:203      评论:0      收藏:0      [点我收藏+]


----------------------Create Table--------------------------------
create table SMS_EXTERNALSYSSMSREQUEST
(
  SMSSENDRECID   VARCHAR2(20) primary key not null,
  SOURCEREF      NUMBER(38) not null,
  SURVEYSVCNO    VARCHAR2(30) not null,
  SURVEYNAME     VARCHAR2(30),
  SENDDATETIME   DATE,
  CREATEUSERID   VARCHAR2(10) not null,
  CREATEDATETIME DATE not null,
  CHANGEUSERID   VARCHAR2(10),
  CHANGEDATETIME DATE,
  CUSTID         VARCHAR2(144),
  ACCTID         VARCHAR2(144),
  SVCNO          VARCHAR2(144),
  SOURCEID       VARCHAR2(50),
  ADDITIONALINFO VARCHAR2(1000)
)
------------------------Alter Table-------------------------------------
Alter table SMS_GREYLIST
add(
    REQREFID NUMBER(38),
    SOURCECODE NUMBER(38) DEFAULT 0
)

Alter table SMS_GREYLIST
modify(
    REQREFID NUMBER(38),
    SOURCECODE NUMBER(38) DEFAULT 0
)

Alter table SMS_GREYLIST
drop(
    REQREFID,
    SOURCECODE
)
------------------------Drop Table------------------------------------------
Drop Table SMS_EXTERNALSYSSMSREQUEST

------------------------Define Sequence----------------------------------------

create Sequence SEQ_UNSUBREQ
increment by 1 --add count every time
start with 1
nomaxvalue
nocycle
cache 10;

-----------------------Add comments to the columns--------------------------
comment on column sms_aicrequest.REASON1   is ‘Survey Type‘

-----------------------Add comments to the columns--------------------------
comment on table TABLENAME  is ‘表的注释‘

 

Oracle Create,Delete,Alter

原文:http://www.cnblogs.com/ganting/p/5077105.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!