Forum Stats

  • 3,814,856 Users
  • 2,258,920 Discussions
  • 7,892,878 Comments

Discussions

NVL like function in Oracle 11G

Uday_N
Uday_N Member Posts: 312 Bronze Badge
edited May 25, 2014 10:58AM in SQL & PL/SQL

Hi All,

          In my interview I got two questions which made me puzzled in the interview.

1)  In Oracle 11G , There is a new function similar to nvl . What is it? I knew we can use decode as nvl function but in 11G, has any function been introduced?

2) Other than IN function, what are the other ways to pass inputs to  a procedure?

Do anyone knew answers to these or questions asked by that interviewer are  wrong? Please give your suggestions...

Tagged:

Best Answer

  • Frank Kulash
    Frank Kulash Member, Moderator Posts: 41,892 Red Diamond
    edited May 24, 2014 10:35PM Answer ✓

    Hi,

    user2639048 wrote:
    
    Hi All,
              In my interview I got two questions which made me puzzled in the interview.
    
    1)  In Oracle 11G , There is a new function similar to nvl . What is it? I knew we can use decode as nvl function but in 11G, has any function been introduced?
    
    
    

    You (or whoever asked you this) may be thinking of COALESCE, but it's older than version 11.

    See COALESCE

    If you had no idea what the function was, then a good answer would be: "I don't know what the function is, but I do know that there's a "New Features" manual in Oralce 11 (and all recent versions), and, even better, a "New Features" chapter at the beginning of the SQL language manual that describes all the new functions.  Knowing exactly what features are new in Oracle 11 is only really important if we're maintaining both Oracle 11 and earlier versions, anyway."

    2) Other than IN function, what are the other ways to pass inputs to  a procedure?
    
    Do anyone knew answers to these or questions asked by that interviewer are  wrong? Please give your suggestions...
    
    

    Sorry, I can't figure out what you're asking.

    IN is not a function.

    IN arguments are usually the best way to pass inputs to a procedure.  If, in an interview, somebody asks about other ways, make it clear that you know this before giving any other answer.

    I suggest you describe what you want in a little more detail.

    Also, create a separate thread for each separate question.  I'm not sure what 2) above is, but it doesn't seem to have anything to do with 1).  (Being asked in the same interview isn't significant.)

Answers

  • Frank Kulash
    Frank Kulash Member, Moderator Posts: 41,892 Red Diamond
    edited May 24, 2014 10:35PM Answer ✓

    Hi,

    user2639048 wrote:
    
    Hi All,
              In my interview I got two questions which made me puzzled in the interview.
    
    1)  In Oracle 11G , There is a new function similar to nvl . What is it? I knew we can use decode as nvl function but in 11G, has any function been introduced?
    
    
    

    You (or whoever asked you this) may be thinking of COALESCE, but it's older than version 11.

    See COALESCE

    If you had no idea what the function was, then a good answer would be: "I don't know what the function is, but I do know that there's a "New Features" manual in Oralce 11 (and all recent versions), and, even better, a "New Features" chapter at the beginning of the SQL language manual that describes all the new functions.  Knowing exactly what features are new in Oracle 11 is only really important if we're maintaining both Oracle 11 and earlier versions, anyway."

    2) Other than IN function, what are the other ways to pass inputs to  a procedure?
    
    Do anyone knew answers to these or questions asked by that interviewer are  wrong? Please give your suggestions...
    
    

    Sorry, I can't figure out what you're asking.

    IN is not a function.

    IN arguments are usually the best way to pass inputs to a procedure.  If, in an interview, somebody asks about other ways, make it clear that you know this before giving any other answer.

    I suggest you describe what you want in a little more detail.

    Also, create a separate thread for each separate question.  I'm not sure what 2) above is, but it doesn't seem to have anything to do with 1).  (Being asked in the same interview isn't significant.)

  • user8167598
    user8167598 Member Posts: 114

    hi

    I think fro question 2 I would have saitd:

    Procedures support two modes fro passing variables. THese are IN (read only, and IN OUT which allows the procedure to update the value passed by the client. The parameters can be of any data type supported by Oracle.

    user8167598
  • Uday_N
    Uday_N Member Posts: 312 Bronze Badge

    Hi Kulash/user8167598,

                                            Thanks for your answers. Sorry for mentioning IN as function. I was confused in interview when they asked such questions . So I thought to ask in this forums whether such things like alternative for nvl (introduced in 11G) exists . Thanks for your clarifications.

This discussion has been closed.