Here you can find the source of nvl(E expr1, E expr2)
Parameter | Description |
---|---|
expr1 | a parameter |
expr2 | a parameter |
public static <E> E nvl(E expr1, E expr2)
//package com.java2s; public class Main { /**//from w w w . j ava 2 s . com * Nvl function. Same as in Oracle SQL. NVL lets you replace null (returned * as a blank) with a string in the results of a query. If expr1 is null, * then NVL returns expr2. If expr1 is not null, then NVL returns expr1. * * @param expr1 * @param expr2 * * @return return (null != expr1) ? expr1 : expr2; */ public static <E> E nvl(E expr1, E expr2) { return (null != expr1) ? expr1 : expr2; } }