DBA > Job Interview Questions > Sybase Interview Questions and Answers

What is a Coalesce? What is the equivalent of Or

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

What is a Coalesce? What is the equivalent of Oracle/Db2 Coalesce Function in Sybase ?

Coalesce is also available in Sybase
This functions evaluates the listed expressions and returns the first non-null value. If all the expressions are null, coalesce returns null

USAGE: coalesce(expression, expression [, expression]...)

EXAMPLE: coalesce(initialqty,finalqty,middleqty)

Returns the first occurrence of a non-NULL value in either the initialqty or finalqty or middleqty

(Continued on next question...)

Other Job Interview Questions