Null values ​​in Oracle resolution

DECLARE
  v_code VARCHAR2(20) := '0001';

BEGIN

  IF v_code IS NOT NULL
  THEN
    dbms_output.put_line('is not null');
  END IF;

  IF '' IS NULL
  THEN
    dbms_output.put_line(' The null character is equivalent to null');
  END IF;

  IF v_code <> ''
  THEN
    dbms_output.put_line('');
  ELSE
    dbms_output.put_line(' Do not use <> Whether the comparison is a null character, you should use the is null.');
  END IF;

END;

http://blog.csdn.net/cassaba/archive/2009/11/04/4768183.aspx

--- EOF ---

分类:Database 时间:2011-02-14 人气:79
本文关键词: code lt oracle null values dbms output
分享到:
blog comments powered by Disqus

相关文章

  • oracle null values ​​sort query data 2011-07-11

    sqlserver considered null minimum. Ascending: null default value in the front row. To the back row is: order by case when col is null then 1 else 0 end, col Descending order: null value defaults to be the last. To the top surface, then: order by case

  • Oracle NULL values sort of common approach 2010-02-26

    1, the default address in the Order by Oracle that the null when the default is maximum, so if it is ranked in ascending order ASC final, DESC is descending behind the front two, use the nvl function nvl function can be input parameters is empty conv

  • oracle null values sort of problem 2010-08-17

    In order for the data when the null value of the field sometimes want standing in the front row at the back can sometimes wish to adopt the following keywords to control order by field name asc / desc nulls first / last

  • oracle null values ​​sort of problem 2010-08-17

    To sort the data when the null value field sometimes want the top surface, and sometimes hope at the back by the following keywords to control the order by field name asc / desc nulls first / last

  • MYSQL.MS SQL. ORACLE handle NULL values summary 2010-08-06

    Description: Inquiries need to assign a null value for the custom value. 1.MSSQL: ISNULL () 2.Oracle: NVL () 3.Mysql: IFNULL () In SQL Server Oracle MySQL as the database to identify how to do a certain value NULL? 1.MSSQL: ISNULL () Grammar ISNULL (

  • Oracle database using the specified value instead of null values ​​in query results 2011-05-22

    Two cases: 1 replacement value is for display only 2 substitute values ​​in the calculation Case 1: NULL value is not displayed by default, so it can not distinguish between NULL values ​​and empty strings. Then you can use: SET NULL replacement valu

  • freemarker Quick Start + null values many ways 2010-04-30

    Introduction: Why use templates? With JSTL, you need to freemarker? Template nothing to do with the container, the same can be applied to non-Web application environment. ftl file that does not need the compiled after changes, this is different from

  • iBatis for the handling of null values 2010-03-29

    Ibatis as a database persistence layer to use people who have experience, Ibatis handling of NULL values is not elegant. This article discusses the NULL value of the common treatment options. JdbcType should be enumerated in the type java.sql.Types i

  • oralce query handling null values 2010-07-06

    oralce query handling null values 1, the null value on the front select * from table order by column asc / desc nulls first 2, the null value on the final surface select * from table order by column asc / desc nulls last 3 SQL to handle null values t

  • Select the result with the specified value instead of null values ​​in the 2011-05-22

    Two possibilities: 1. Replacement value is only for display 2. Alternative calculation of the value of participation Case 1: What is the NULL value is not displayed by default, so it can not distinguish between NULL values ​​and empty strings. The so

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 闽ICP备15018612号

processed in 0.081 (s). 11 q(s)