Boolean value function parameter : Function Parameters « Store Procedure Function « Oracle PL / SQL

Oracle PL / SQL
1. Aggregate Functions
2. Analytical Functions
3. Char Functions
4. Constraints
5. Cursor
6. Data Type
7. Date Timezone
8. Hierarchical Query
9. Index
10. Insert Delete Update
11. Numeric Math Functions
12. Object Oriented Database
13. PL SQL
14. Regular Expressions
15. Report Column Page
16. Result Set
17. Select Query
18. Sequence
19. SQLPlus
20. Store Procedure Function
21. Subquery
22. System Tables
23. Table
24. Table Joins
25. Trigger
26. User Previliege
27. View
28. XML
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Oracle PL / SQL » Store Procedure Function » Function Parameters 
Boolean value function parameter

SQL>
SQL> create or replace
  2  function ite(
  3    p_expression boolean,
  4    p_true varchar2,
  5    p_false varchar2 return varchar2 as
  6  begin
  7    if p_expression then
  8        return p_true;
  9    end if;
 10    return p_false;
 11  end ite;
 12  /

Function created.

SQL>
SQL>  set serverout on
SQL>
SQL>
SQL>  exec dbms_output.put_lineite1=2'Equal', 'Not Equal' ) );
Not Equal

PL/SQL procedure successfully completed.

SQL>
SQL>  exec dbms_output.put_lineite2>3'True', 'False' ) );
False

PL/SQL procedure successfully completed.

SQL>
SQL>
SQL>

           
       
Related examples in the same category
1. Pass value to function parameter
www.java2java.com | Contact Us
Copyright 2010 - 2030 Java Source and Support. All rights reserved.
All other trademarks are property of their respective owners.