[dbo].[is_different_integer]
(local)
>
mdb
>
Scalar-valued Functions
> dbo.is_different_integer
Properties
Parameters
SQL Script
Uses
Properties
Property
Value
ANSI Nulls On
Quoted Identifier On
Parameters
Name
Data Type
Max Length (Bytes)
@old_value
int
4
@new_value
int
4
SQL Script
CREATE
FUNCTION
dbo.is_different_integer
(
@old_value
integer
,
@new_value
integer
)
RETURNS
int
AS
BEGIN
-- NULL has to be treated separately as comparison results in unknown!
if
@old_value
IS
NULL
if
@new_value
IS
NULL
return
0
else
return
1
if
@new_value
IS
NULL
return
1
if
@old_value
<>
@new_value
return
1
return
0
END
GO
Uses
dbo