码迷,mamicode.com
首页 >  
搜索关键字:nullif    ( 111个结果
MySQL 的IFNULL()、ISNULL()和NULLIF()函数
参考与http://blog.csdn.net/xingyu0806/article/details/52080962 IFNULL(expr1,expr2) 假如expr1不为NULL,则 IFNULL() 的返回值为expr1; 否则其返回值为 expr2(数字或是字符串)。IFNULL()的返 ...
分类:数据库   时间:2018-01-26 20:41:11    阅读次数:257
Statistics access traffic of apache logs
#!/bin/bashsum=0exec<$1whilereadline;dosize=echo$line|awk‘{print$10}‘expr$size+1&>/dev/nullif[$?-ne0];thencontinuefi((sum=sum+size))doneecho"Thetotalbyes=echo$((${sum}/1024))&qu
分类:数据库   时间:2018-01-24 12:42:24    阅读次数:188
SQL知识总结
case whenhttp://blog.sina.com.cn/s/blog_4c538f6c01012mzt.htmlNVL NVL2 NULLIF Coalescehttps://www.cnblogs.com/zrui-xyu/p/4819712.htmljoin unionhttps:// ...
分类:数据库   时间:2018-01-23 20:44:48    阅读次数:205
Guess the number
#!/bin/bashtotal=0num=$((RANDOM%41))pear(){read-p"pleaseinputnumber:"aexpr$a+1&>/dev/nullif[$?-ne0];thenecho"pleaseinputnumber;"pearfi}guess(){((total++))if[$a-eq$num];thene
分类:其他好文   时间:2018-01-23 11:52:01    阅读次数:130
judge input type
#!/bin/bashwhiletrue;doread-p"pleaseinput:"aexpr$a+1&>/dev/nullif[$?-eq0];thenecho"inputisint."elseecho"inputischar."fiif[$a==‘q‘];thenbreakfidone
分类:其他好文   时间:2018-01-11 11:46:53    阅读次数:188
operators usages
#!/bin/bashif[$#-ne2];thenecho"pleaseinputtwoarguments:"exit2fiexpr$1+2&>/dev/nullif[$?-ne0];thenecho"pleaseinputint."exit3fiexpr$2+3&>/dev/nullif[$?-ne0];thenecho&qu
分类:其他好文   时间:2018-01-11 11:24:14    阅读次数:145
监控系统资源加邮件提醒
#!/usr/bin/bash**echo"##########关于cpu##########"vmstat&>/dev/nullif[$?-ne0];thenecho"vmstatcommandisnotfound,pleaseinstallit!"yuminstall-yprocpsecho"命令已安装!请重新执行该命令"
分类:其他好文   时间:2018-01-10 13:51:16    阅读次数:184
bash脚本进阶练习题
1、编写脚本/root/bin/createuser.sh,实现如下功能:使用一个用户名做为参数,如果指定参数的用户存在,就显示其存在,否则添加之;显示添加的用户的id号等信息[$#-lt1]&&echo"inputusername!"&&exitid$1&>/dev/nullif[$?-eq1];thenuseradd$1;echo-e"successful\n`id$1`"elseecho"u
分类:其他好文   时间:2017-12-29 00:03:17    阅读次数:247
[转载]Oracle中的NVL函数
Oracle中函数以前介绍的字符串处理,日期函数,数学函数,以及转换函数等等,还有一类函数是通用函数。主要有:NVL,NVL2,NULLIF,COALESCE,这几个函数用在各个类型上都可以。 下面简单介绍一下几个函数的用法。 在介绍这个之前你必须明白什么是oracle中的空值null 1.NVL函 ...
分类:数据库   时间:2017-11-29 11:31:54    阅读次数:194
MySql 中IFNULL、ISNULL、NULLIF用法(数据库判空)
来源:http://blog.csdn.net/a466350665/article/details/52994761 http://blog.csdn.net/xingyu0806/article/details/52080962 IFNULL(expr1,expr2)用法:假如expr1不为NU ...
分类:数据库   时间:2017-11-28 01:29:22    阅读次数:203
111条   上一页 1 ... 3 4 5 6 7 ... 12 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!