Wednesday, April 23, 2008

If you fetch past the last row in the result set, the values of the target variables are undefined.
Note: Eventually, the FETCH statement fails to return a row. When that happens, no exception is raised. To detect the failure, use the cursor attribute %FOUND or %NOTFOUND.





Cast in Oracle for type casting


COALESCE function


In Oracle/PLSQL, the coalesce function returns the first non-null expression in the list. If all expressions evaluate to null, then the coalesce function will return null.
The syntax for the coalesce function is:
coalesce( expr1, expr2, ... expr_n )

IF expr1 IS NOT NULL THEN

RETURN expr1;

ELSIF expr2 IS NOT NULL THEN

RETURN expr2;

....

ELSE

RETURN NULL ;

END IF;

Oracle is an object-relational database management system (ORDBMS), which means that users can define additional kinds of data--specifying both the structure of the data and the ways of operating on it--and use these types within the relational model. This approach adds value to the data stored in a database. User-defined datatypes make it easier for application developers to work with complex data such as images, audio, and video. Object types store structured business data in its natural form and allow applications to retrieve it that way. For that reason, they work efficiently with applications developed using object-oriented programming techniques.

No comments: