Default value of the function Plsql function

Source: Internet
Author: User

1. Create a function

1 CREATE OR REPLACE FUNCTIONFk_url_format (URLVARCHAR2, CharSetVARCHAR2:='UTF-8')RETURN VARCHAR22  is3 BEGIN4 Dbms_output.put_line (charset);5    RETURNUtl_url.Escape(url,true,charset);6 END;
-Using default can also:CREATE OR REPLACE FUNCTION fk_url_format (url varchar2,charset VARCHAR2 DEFAULT ' UTF-8 ') RETURN VARCHAR2

2. Call

1 DECLARE 2   VARCHAR2 (a); 3 BEGIN 4   Vflag:=Fk_url_format ('HELLO'); 5 END;

3. Output (the result has a default value of UTF-8)

Default value of the function Plsql function

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.