zoukankan      html  css  js  c++  java
  • Oracle 对表的基本CURD操作!

    Oracle对表的基本Curd操作:

    样式表:接下来对这张(表明:Stud)表进行Curd操作(请看面SQL代码)

        

    1):增加新的字段列:

    alter table Stud add(height varchar2(100))       
    --解释:alter table 表名称 add(字段名 字段类型  默认值 是否为空);--此出的默认值 是否为空可省略不写        关键字:add

     

    2):修改字段的类型:

    alter table Stud modify(height number(4))     
    --解释:alter table 表名称 modify (字段名 字段类型  默认值 是否为空);--此出的默认值 是否为空可省略不写   关键字:modify

    3):修改字段名称:

    alter table Stud rename column height to gao  
    --解释: alter table 表名称 rename column 想要修改的列名称 to 列的新名称         关键字: rename column  * to *

    4):删除表中多余的列:

    alter table Stud drop column gao     
    --解释:alter table 表明称 drop column 不想要的列                             关键字:drop column

    5):修改表的的名称:

    alter table Stud rename to xuesheng (不会破坏表的结构和字段类型及其内容)    关键:注意表明称不要写反
    --解释:alter table 原表名称 rename to 改后的表明

    生在内卷,你卷我也卷。 愿与诸君共勉!
  • 相关阅读:
    linux下载和解压命令
    检测是否存在post类型的注入
    snort的学习
    解决ERROR: D:Snortetcsnort.conf(511) Unknown preprocessor: "sip". Fatal Error, Quitting..
    代理服务器
    Settimer及回调函数的用法
    vm安装ubantu的详细过程(转载)
    linux 常用指令汇总
    linux 用户及文件权限管理
    linux 基础知识
  • 原文地址:https://www.cnblogs.com/superyonng/p/13268466.html
Copyright © 2011-2022 走看看