Oracle-function Practice

Source: Internet
Author: User

/**scm_iss.test_imti_fun2* function*/create OR REPLACE FUNCTION test_imti_fun2 (p_no in number) with input parameters RETURN VARCHAR2 is  P_imti_name VARCHAR2 (200);  P_imti_desc VARCHAR2 (200); P_return VARCHAR2 (200); BEGIN--select i.imti_name into P_imti_name from Scm_iss.  T_imti_test I WHERE i.imti_no = p_no; SELECT I.imti_desc, i.imti_name into P_imti_desc, p_imti_name from Scm_iss.  T_imti_test I WHERE i.imti_no = p_no;  --p_imti_desc: = P_imti_name; P_return: = P_imti_name | | ':' ||  P_imti_desc; RETURN P_return; EXCEPTION when OTHERS and then Dbms_output. Put_Line (' EXCEPTION: ' | | SQLERRM); END test_imti_fun2;/**scm_iss.test_imti_fun3* function*/create OR REPLACE FUNCTION test_imti_fun3 with input and output parameters (P_no in Number, p_name out VARCHAR2) RETURN VARCHAR2 isbegin--Call the stored procedure Scm_iss of the input and output parameters. Test_imti_pro3 (P_no,p_name); RETURN P_name; end;--Test Call Declarea VARCHAR2 (200); --Accept output parameter B VARCHAR2 (200); BEGIN B: = Scm_iss.  TEST_IMTI_FUN3 (1005,a); Dbms_output.put_line (' B value: ' | |    B); Dbms_output.put_line (' A value: ' | | A; END;

Oracle-function Practice

Related Article

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: 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.