Oracle's NVL and SQL Server IsNull

Source: Internet
Author: User
Tags sql server isnull

Recently, the company is doing Oracle database related products, here to summarize:

ISNULL () function

Grammar
ISNULL (Check_expression, Replacement_value)
Parameters
Check_expression
An expression that will be checked for null. Check_expression can be of any type.
Replacement_value
The expression that will be returned when check_expression is null. Replacement_value must have the same type as check_expresssion.
return type
Returns the same type as check_expression.
Notes
If Check_expression is not NULL, the value of the expression is returned, otherwise Replacement_value is returned.

----------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------

NVL () function

Returns a non-null value from two expressions.
Grammar
NVL (EExpression1, EExpression2)
Parameters
EExpression1, EExpression2
If the eExpression1 evaluates to a null value, NVL () returns EEXPRESSION2. If the EExpression1 evaluates to a value other than NULL, the EExpression1 is returned. EExpression1 and EExpression2 can be any data type. If the result of both EExpression1 and EExpression2 is null, then NVL () returns. Null..
return value type
character, date, datetime, numeric, currency, logical, or null values
Description
You can use NVL () to remove null values from a calculation or operation in cases where null values are not supported or if NULL values do not matter.

Select NVL (a.name, ' empty ') as name from student a joins school B on A.id=b.id

Note: Two parameter types to match

Oracle's NVL and SQL Server IsNull

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.