Store procedure question...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BbEsy
    New Member
    • Sep 2009
    • 28

    Store procedure question...

    im working with ms sql for few years, now i changed it to oracle..

    how i can make stored procedure returns a table ?

    in msssql is ..
    CREATE PROCEDURE dbo.GetRecord (@ID int)
    AS
    select ID,Name, Value2 from tblMain Inner join tblData on tblData.fkMain = tblMain.pkMain where id=@ID

    how i can write it in oracle sql ?
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    Define a pipelined function

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      I think a procedure / function with ref cursor as out parameter is what you are looking for.

      Comment

      Working...