//z 11/9/2011 2:49 PM @is2120@csdn
2. ORACLE 中查看和修改存储过程
2.1
select text from user_source where name='PROCEDURE' order by line;
2.2
select text from all_source where owner='USERNAME' and type='PROCEDURE' and name='PROCEDURENAME';
2.3
set heading off
set echo off
set feedback off
set pages off
set long 90000
SEELCT DBMS_METADATA.GET_DDL( 'PROCEDURE ', 'YOURPROCEDURENAME ') FROM USER_OBJECTS WHERE OJBECT_TYPE= 'PROCEDURE ' AND OBJECT_NAME= 'YOURPROCEDURENAME ';
1. 空字符串和null value的区别 zz
在面向sql server和oracle的代码中因为加了Column<>''导致返回的结果不一致,经查询才知道oracle对空字符串("")做了特殊处理;应该是常识,
记录一下。
Oracle/PLSQL:Difference between an empty string and a null value
Question: What is the differencebetween an "empty" value and a "null" value? When Iselect those fields that are "empty" versus "null", I gettwo different result sets.
Answer: An empty string is treatedas a null value in Oracle. Let's demonstrate.
We've created a table calledsuppliers with the following table definition:
create table suppliers
|
( supplier_id
|
number,
|
supplier_name
|
varchar2(100));
|
Next, we'll insert two records intothis table.
insert into suppliers (supplier_id,supplier_name )
values ( 10565, null );
insert into suppliers (supplier_id,supplier_name )
values ( 10567, '' );
The first statement inserts a recordwith a supplier_name that is null, while the second statement inserts arecord with an empty string as asupplier_name.
Now, let's retrieve all rows with asupplier_name that is an empty string value as follows:
select * from suppliers
where supplier_name = '';
When you run this statement, you'dexpect to retrieve the row that you inserted above. But instead, this statementwill not retrieve any records at all.
Now, try retrieving all supplier_idsthat contain a null value:
select * from suppliers
where supplier_name is null;
When you run this statement, youwill retrieve both rows. This is because Oracle has now changed its rules sothat empty strings behave as null values.
It is also important to note thatthe null value is unique in that you can not use the usual operands (=,<, >, etc) on a null value. Instead, you must use theIS NULL and
IS NOT NULLconditions.
Acknowledgements: We'd like to thank Charles Rothfor contributing to this solution!
c# sql server oracle 空字符串 String.Empty "" '' <> null
分享到:
相关推荐
Oracle SQL:经典查询练手四篇Oracle SQL:经典查询练手四篇Oracle SQL:经典查询练手四篇
oracle pl sql 实例精解 oracle pl sql 实例精解 oracle pl sql 实例精解
《Oracle PL/SQL程序设计(第5版)》基于Oracle数据库11g,从PL/SQL编程、PL/SQL程序结构、PL/SQL程序数据、PL/SQL中的SQL、PL/SQL应用构建、高级PL/SQL主题这6个方面详细系统地讨论了PL/SQL以及如何有效地使用它。...
Oracle PL SQL 程序设计 下 第五版 中文版
《oracle pl/sql程序设计(第5版)》基于oracle数据库11g,从pl/sql编程、pl/sql程序结构、pl/sql程序数据、pl/sql中的sql、pl/sql应用构建、高级pl/sql主题6个方面详细系统地讨论了pl/sql以及如何有效地使用它。...
《oracle pl/sql程序设计(第5版)(上下册)》基于oracle数据库11g,从pl/sql编程、pl/sql程序结构、pl/sql程序数据、pl/sql中的sql、pl/sql应用构建、高级pl/sql主题这6个方面详细系统地讨论了pl/sql以及如何有效地...
At the heart of much of Oracle’s software is PL/SQL—a programming language that provides procedural extensions to Oracle’s version of SQL (Structured Query Language) and serves as the programming ...
Oracle PL SQL完全自学手册(宫生文),高清扫描。
《oracle pl/sql程序设计(第5版)(上下册)》基于oracle数据库11g,从pl/sql编程、pl/sql程序结构、pl/sql程序数据、pl/sql中的sql、pl/sql应用构建、高级pl/sql主题这6个方面详细系统地讨论了pl/sql以及如何有效地...
Oracle PL SQL完全自学手册(宫生文)。
《Oracle PL/SQL程序设计(第5版)(套装上下册)》基于Oracle数据库11g,从PL/SQL编程、PL/SQL程序结构、PL/SQL程序数据、PL/SQL中的SQL、PL/SQL应用构建、高级PL/SQL主题这6个方面详细系统地讨论了PL/SQL以及如何...
Oracle PL SQL Programming(5th) 英文无水印pdf 第5版 pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请...
Oracle PL SQL语言基础Oracle PL SQL语言基础Oracle PL SQL语言基础Oracle PL SQL语言基础Oracle PL SQL语言基础Oracle PL SQL语言基础
Oracle PL SQL Programming(6th) 英文无水印pdf 第6版 pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请...
oracle PL SQL 程序设计(第5版)上册,用于想学习oracle知识方面的同学
oracle pl/sql 存储过程和函数与触发器
Oracle PL/SQL实例精解 student模式 数据库建立代码 包括数据库的建立、索引等。样本数据的插入。
这是我自己根据书本《ORACLE PL/SQL从入门到精通》何明,写的笔记,有目录。
本书是专门为Oracle应用开发人员提供的SQL和PL/SQL编程指南。通过学习本书,读者不仅可以掌握Oracle常用工具Oracle Universal Installer、Net Comfiguration Assistant、SQL Developer、SQL*Plus的作用及使用方法,...