当前位置:网站首页>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 只有一个参数
边栏推荐
- Multi-Party Threshold Private Set Intersection with Sublinear Communication-2021:解读
- MySQL database - stored procedures and functions
- 安徽建筑大学&杭州电子科技大学|基于机器学习方法的建筑可再生能源优化控制
- TestNG多个xml进行自动化测试
- kubernetes - deploy nfs storage class
- Multi-Party Threshold Private Set Intersection with Sublinear Communication-2021: Interpretation
- 【周赛复盘】LeetCode第304场单周赛
- 483-82(23、239、450、113)
- #yyds干货盘点# 面试必刷TOP101: 链表中倒数最后k个结点
- Stop using MySQL online DDL
猜你喜欢
![[Kapok] #Summer Challenge# Hongmeng mini game project - Sudoku (3)](/img/8d/4f5f7c2463b781cba1c68370d3c29c.png)
[Kapok] #Summer Challenge# Hongmeng mini game project - Sudoku (3)

How many steps does it take to convert an ENS domain name into music?

网站建设流程

7月30号|来一场手把手助您打造智能视觉新爆款的技术动手实验

C#/VB.NET: extracted from the PDF document all form

DAO开发教程【WEB3.0】

kubernetes-部署nfs存储类

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

The life cycle and scope

Three solutions: npm WARN config global --global, --local are deprecated. Use --location=global instead.
随机推荐
Win11怎么安装语音包?Win11语音包安装教程
金鱼哥RHCA回忆录:CL210管理OPENSTACK网络--网络配置选项
Try compiling QT test on Allwinner V853 development board
odoo 编码规范(编程规范、编码指南)
PanGu-Coder:函数级的代码生成模型
What are the application advantages of SaaS management system?How to efficiently improve the digital and intelligent development level of food manufacturing industry?
TestNG multiple xml for automated testing
ClassID的计算中,&表示啥意思
消息模板占位符的使用
MLX90640 Infrared Thermal Imager Temperature Measurement Module Development Notes (Complete)
Multi-Party Threshold Private Set Intersection with Sublinear Communication-2021: Interpretation
Go GORM transaction instance analysis
Three solutions: npm WARN config global --global, --local are deprecated. Use --location=global instead.
123123123123
odoo coding conventions (programming conventions, coding guidelines)
Write code anytime, anywhere -- deploy your own cloud development environment based on Code-server
[pyqt5] Custom controls to achieve scaling sub-controls that maintain the aspect ratio
Stop using MySQL online DDL
Industry Salon Phase II丨How to enable chemical companies to reduce costs and increase efficiency through supply chain digital business collaboration?
暑假第二周总结博客