当前位置:网站首页>SQL的 ISNULL 函数
SQL的 ISNULL 函数
2022-08-01 19:01:00 【罗罗的1024】
Sybase版本
语法
IsNull ( check_expression ,replacement_value)
如果 check_expression 不为 NULL,那么返回该表达式的值;否则返回 replacement_value
-- 成功执行
SELECT ISNULL('你好', 2)
-- 报错,类型转换失败
SELECT isnull(s.address, s.age) FROM Student s
说明:address 是vachar 类型,age是 int 类型
上面的第一个sql 和 第二个sql 为啥一个成功,一个报错,根本原因目前还不清楚
MySQL版本
MySQL的 ISNULL
语法: IsNull ( expr )
如果 expr 为null,那么isnull() 的返回值为 1,否则返回值为 0。
总结
Sybase 的IsNull 有两个参数
MySQL 的IsNull 只有一个参数
边栏推荐
- 123123123123
- 哈哈!一个 print 函数,还挺会玩啊!
- MLX90640 Infrared Thermal Imager Temperature Measurement Module Development Notes (Complete)
- 用VS2013编译带boost库程序时提示 fatal error C1001: 编译器中发生内部错误
- 首篇 NLP 领域图神经网络综述:127 页,从图构建到实际应用面面观
- Source code analysis of GZIPOutputStream class
- 【LeetCode】Day109-最长回文串
- ExcelPatternTool: Excel表格-数据库互导工具
- 暑假第一周总结博客
- 随时随地写代码--基于Code-server部署自己的云开发环境
猜你喜欢

#yyds dry goods inventory# Interview must brush TOP101: the last k nodes in the linked list
![[Neural Network] This article will take you to easily analyze the neural network (with an example of spoofing your girlfriend)](/img/2c/18ce72dfd0889d901ea0d95721ed19.png)
[Neural Network] This article will take you to easily analyze the neural network (with an example of spoofing your girlfriend)

GZIPOutputStream 类源码分析

【蓝桥杯选拔赛真题47】Scratch潜艇游戏 少儿编程scratch蓝桥杯选拔赛真题讲解

在表格数据上,为什么基于树的模型仍然优于深度学习?

odoo coding conventions (programming conventions, coding guidelines)
Stop using MySQL online DDL

Hardware Bear Original Collection (Updated 2022/07)

log factory (detail)

XML配置
随机推荐
How many steps does it take to convert an ENS domain name into music?
2022年 PHP面试问题记录
MySQL database - stored procedures and functions
The life cycle and scope
Write code anytime, anywhere -- deploy your own cloud development environment based on Code-server
【LeetCode】Day109-the longest palindrome string
mysql函数的作用有哪些
Clip-on multimeter use method, how to measure the voltage, current, resistance?
Win11怎么安装语音包?Win11语音包安装教程
升哲科技携全域数字化方案亮相2022全球数字经济大会
kubernetes - deploy nfs storage class
深入浅出Flask PIN
Use of message template placeholders
odoo 编码规范(编程规范、编码指南)
1065 A+B and C (64bit)
首篇 NLP 领域图神经网络综述:127 页,从图构建到实际应用面面观
Choosing the right DevOps tool starts with understanding DevOps
Tencent Cloud Hosting Security x Lightweight Application Server | Powerful Joint Hosting Security Pratt & Whitney Version Released
No need to crack, install Visual Studio 2013 Community Edition on the official website
WinRAR | 将多个安装程序生成一个安装程序