Dreamhunter Blog

你指尖跃动的电光,是我此生不变的信仰

vuePress-theme-reco Dreamhunter    2019 - 2022
Dreamhunter Blog

Choose mode

  • dark
  • auto
  • light
首页
分类
  • algorithm
  • database
  • devops
  • docker
  • front
  • git
  • hackintosh
  • http
  • java
  • linux
  • odoo
  • nginx
  • macos
  • mq
  • other
  • python
  • redis
  • router
标签
归档
GitHub (opens new window)
author-avatar

Dreamhunter

119

文章

40

标签

首页
分类
  • algorithm
  • database
  • devops
  • docker
  • front
  • git
  • hackintosh
  • http
  • java
  • linux
  • odoo
  • nginx
  • macos
  • mq
  • other
  • python
  • redis
  • router
标签
归档
GitHub (opens new window)
  • Database

    • SQL NULL Func
    • SQL 约束
    • Mysql 关键字执行顺序
    • SQL 基本语句
    • redis 快的原因

SQL NULL Func

vuePress-theme-reco Dreamhunter    2019 - 2022

SQL NULL Func

Dreamhunter 2019/10/21 database

# SQL NULL 函数

将 null 替换为某个值

# ISNULL()

  • SQL Server / MS Access
SELECT ISNULL(demo,0))
FROM demo

# NVL()

  • Oracle
SELECT NVL(demo,0))
FROM demo

# IFNULL()

  • Mysql
SELECT IFNULL(demo,0))
FROM demo

# COALESCE()

  • Mysql/Pgsql
SELECT COALESCE(demo,0))
FROM demo

SQL 约束

  • SQL NULL 函数
  • ISNULL()
  • NVL()
  • IFNULL()
  • COALESCE()