Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 393 Bytes

Tips in SQL.md

File metadata and controls

20 lines (13 loc) · 393 Bytes

SQL中的一些内容

约束相关

  1. 删除约束

    alter table tablename drop constraint constraintname
  2. 新建约束,并给字段设置默认值

    //添加字段
    Alter table tableName add column_name type 
    //设置默认值
    alter table tablename add constraint constraintname default '默认值' for 字段名