---
title: "oracle is null 和 oracle is not null"
author: "winzenghua"
date: "2010-06-09T08:59:00Z"
tags: []
slug: "oracle-is-null-oracle-is-not-null"
draft: false
lastmod: "2010-06-09T08:59:00Z"
id: 947698
url: "https://java4gis.iteye.com/blog/947698"
---

当字符串为空时，在when 使用 is null来判断。

.当字符串不为空时，在when 使用 is not null来判断。

例如：

create table test ( stuno number(10) primary key, stuname varchar2(50) )

insert into test(stuno) values(10)

insert into test(stuno,stuname) values(11,' ')

select * from test where stuname is null才会取到所有值。

而select * from test where stuname=''不行。

[www.ttsmm.com](http://www.ttsmm.com)