zoukankan      html  css  js  c++  java
  • SQL语句学习

    1. 向表中添加新的字段

       alter  table  table_name  add  column_name  varchar2(20) not null

    2. 删除表中的一个字段

        delete table table_name column column_name

    3. 修改表中的一个字段名

       alter table table_name rename column oldname to newname

    4. 添加主键约束
       alter table 表名
       add constraint 约束名 primary key (列名)

    5. 添加唯一约束
       alter table 表名
       add constraint 约束名 unique (列名)

    6. 添加默认约束
       alter table 表名
        add constraint 约束名 default(内容) for 列名

    7. 添加check约束
       alter table 表名
       add constraint 约束名 check(内容)

    8. 添加外键约束
       alter table 表名
       add constraint 约束名 foreign key(列名) references 另一表名(列名)

    9. 删除约束
       alter table 表名
       drop constraint 约束名

  • 相关阅读:
    struts2类型转换
    struts2拦截器
    计算机系统结构
    struts2标签
    struts2 OGNL表达式
    使用bootstrap
    Struts2-综合项目
    拦截器,课3
    struts2之OGNL
    Struts2框架
  • 原文地址:https://www.cnblogs.com/lcword/p/6396170.html
Copyright © 2011-2022 走看看