摘要: 语法:updat table_name set column_name1 = case id when 1 then 'a' when 2 then 'b' when 3 then 'c' end, colunm_name = case id when 1 then 'd' when 2 then 阅读全文
posted @ 2020-05-20 16:57 jerrygogo 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1、创建默认值:列名 列数据类型 default 默认值。之后的 insert 如果没有指定该列名的值,则使用默认值。 2、语法1:删除默认值条件:alter table table_name change column column_name column_name 数据类型 default nu 阅读全文
posted @ 2020-05-20 11:43 jerrygogo 阅读(627) 评论(0) 推荐(0) 编辑
摘要: 1、表达式:check <表达式> 2、修改表时添加约束条件:alter table table_name add constraint 列名 check <表达式>; 3、删除约束条件:alter table table_name drop constraint 列名; 阅读全文
posted @ 2020-05-20 11:23 jerrygogo 阅读(1017) 评论(0) 推荐(0) 编辑