2018年8月8日

MySQL添加列、删除列,创建主键等常用操作总结

摘要: 一. 列常用操作 ① 添加新的一列test_column,并将其作为主键,FIRST将其放在表中第一行,auto_increement是自动增长 1 可以使用SQL语句“alter table ai3 add id0 int auto_increment primary key first;”来添加 阅读全文

posted @ 2018-08-08 10:13 快舔包我很肥 阅读(9328) 评论(0) 推荐(2) 编辑

SQL Server函数之空值处理

摘要: coalesce( expression [ ,...n ] )返回其参数中第一个非空表达式。 Select coalesce(null,null,'1','2') //结果为 1 coalesce(expression1,...n) 与此 case函数等效: CASEWHEN (expressio 阅读全文

posted @ 2018-08-08 10:12 快舔包我很肥 阅读(3943) 评论(0) 推荐(1) 编辑

SqlServer中循环和条件语句

摘要: if语句使用示例 declare @a int set @a=12 if @a>100 begin print @a end else begin print 'no' end while语句使用示例 declare @i int set @i=1 while @i<30 begin insert 阅读全文

posted @ 2018-08-08 09:58 快舔包我很肥 阅读(13490) 评论(0) 推荐(0) 编辑

导航