NVL函数 对应于SQLSERVER的isnull to_date函数 对应于convert或cast --------------------------------------------------- ISNULL (T-SQL) Replaces NULL with the specified replacement value.Syntax ISNULL(check_expression, replacement_value)Arguments check_expression Is the expression to be checked for NULL. check_expression can be of any type. replacement_value Is the expression to be returned if check_expression is NULL. replacement_value must have the same type as check_expresssion. Return Types Returns the same type as check_expression.Res The value of check_expression is returned if it is not NULL; otherwise, replacement_value is returned. --------------------------------------------------------- Syntax Using CAST:CAST(expression AS data_type)Using CONVERT:CONVERT (data_type[(length)], expression [, style])
convert(datetime,string,datetime_format)
Insert into demo(demo_key,date_col)
Values(1 , to_date(’04-Oct-1999’, ‘DD-Mon-yyyy’) );在SQl中对应的是 ISNULL
使用指定的替换值替换 NULL。语法
ISNULL ( check_expression , replacement_value ) 参数
check_expression将被检查是否为 NULL的表达式。check_expression 可以是任何类型的。replacement_value在 check_expression 为 NULL时将返回的表达式。replacement_value 必须与 check_expresssion 具有相同的类型。 返回类型
返回与 check_expression 相同的类型。convert(datetime,string,datetime_format)
to_date函数 对应于convert或cast
---------------------------------------------------
ISNULL (T-SQL)
Replaces NULL with the specified replacement value.Syntax
ISNULL(check_expression, replacement_value)Arguments
check_expression
Is the expression to be checked for NULL. check_expression can be of any type.
replacement_value
Is the expression to be returned if check_expression is NULL. replacement_value must have the same type as check_expresssion.
Return Types
Returns the same type as check_expression.Res
The value of check_expression is returned if it is not NULL; otherwise, replacement_value is returned.
---------------------------------------------------------
Syntax
Using CAST:CAST(expression AS data_type)Using CONVERT:CONVERT (data_type[(length)], expression [, style])
convert(datetime,string,datetime_format)
to_date()是将字符串地、转换成日期的函数,主要是YYYY-MM-DD HH:MM:SS的格式