This function is used to replace the value NULL with another value. If data1 is null, it will return data2 and if data1 is not null it will return data1. It should be considered that the arguments (data1 and data2) can contain any type of data, but in case of be of a different type, the database will automatically convert them and in the case of can not convert them, the system will return an error.

1 sql.nvl

    <data1 /> !
    <data2 /> !
<xsql-script name='test_sql_nvl'>
        <set name='data1'><null/></set>
        <set name='data2'>DATA2</set>