1 / 5

Sql*Plus

Oracle Server. Query, Procedure Call. Result. Sql*Plus. Executing sp…. Package isk_demo { MaxPos() ; PosCount() ; }. Package isk_demo { MaxPos() ; PosCount() ; }. Call isk_demo.PosCount() ;. Call isk_demo . PosCount() ;. Server. Results. Client.

Télécharger la présentation

Sql*Plus

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Oracle Server Query, Procedure Call Result Sql*Plus

  2. Executing sp… Package isk_demo { MaxPos() ; PosCount() ; } Package isk_demo { MaxPos() ; PosCount() ; } Call isk_demo.PosCount() ; Call isk_demo.PosCount() ; Server Results Client

  3. Create Or Replace Package isk_demo As Function MaxPos(t1 Float, t2 Float, t3 Float, t4 Float, t5 Float) Return Integer ; Pragma Restrict_References(MaxPos, WNDS) ; Procedure PosCount ; End isk_demo ; Create Or Replace Package Body isk_demo As <-- Body of package goes here --> End isk_demo ;

  4. Create Or Replace Package Body isk_demo As Function MaxPos(…) Return Integer <-- Body of function goes here --> Procedure PosCount As Cursor rSet Is Select a0, a1, a2, a3, a4 From demo_test ; Type PosCountArrayType Is Varray(5) Of Integer ; PosCountArray PosCountArrayType := PosCountArrayType() ; I Integer ; Begin For rSetRow In rSet Loop I := MaxPos(rSetRow.a0, rSetRow.a1, rSetRow.a2, rSetRow.a3, rSetRow.a4) ; PosCountArray(I) := PosCountArray(I) + 1 ; End Loop ; <-- Return the result --> End PosCount ; End isk_demo ;

More Related