oracle 創建表,增加修改刪除字段


  1. 創建表
    create table test
    (id varchar2(20) not null);

  2. 增加一個字段
    alter table test
    add (test01 varchar2(30) default ‘無名氏’ not null);

  3. 修改一個字段
    alter table test
    modify (test01 varchar2(16) default ‘無名氏’ not null);

  4. 刪除一個字段
    alter table test
    drop column test01 ;

  5. 重命名表
    ALTER TABLE table_name RENAME TO new_table_name;


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM