2 Replies Latest reply: Feb 14, 2013 4:30 AM by AlbertoFaenza RSS

    use of OUT parameter in functions

    SB2011
      Hi ,

      Can we use OUT and IN OUT parameter in function?
      If yes then how and what is the limitation and if no then why we can't use?

      Thanks & Regards,
      SB2013
        • 1. Re: use of OUT parameter in functions
          IvanBlanarik
          Hi,
          you can use OUT or IN OUT parameter in functions, but you shouldn't :)
          It's a good coding standard that a function should have many input parameter and ONLY ONE output. If you want to return more values then use procedure or define your own composite datatype and return variable of this type.
          • 2. Re: use of OUT parameter in functions
            AlbertoFaenza
            SB2011 wrote:
            Hi ,

            Can we use OUT and IN OUT parameter in function?
            If yes then how and what is the limitation and if no then why we can't use?

            Thanks & Regards,
            SB2013
            You can easily check the documentation about it but yes, output parameters are allowed for functions, despite generally not used.

            The limitation when you define an OUT or an IN OUT parameter for a function is that you cannot use them in SQL.

            You might be interested in checking this: {thread:id=367849}

            Regards.
            Al