Oracle basic alternation

来源:互联网 发布:刺客信条大革命优化 编辑:程序博客网 时间:2024/06/05 23:04
1. add column
alter table transaction
add
(SERVICE_LEVEL_CODE NUMBER,
CRYPTOGRAPHY_INDEX VARCHAR2(20)
)

2. renmae column
alter table sales rename column order_date to date_of_order;

3. drop column

alter table
   transaction
DROP COLUMN  RELATED_REASON_CODE;


4. create index

CREATE INDEX transaction_idx
   ON transaction (instructing_bank_code);

5.alter index

ALTER INDEX index_name
  RENAME TO new_index_name;


6. drop index

DROP INDEX index_name;



原创粉丝点击