[dbo].[is_different_binary]
(local)
>
mdb
>
Scalar-valued Functions
> dbo.is_different_binary
Properties
Parameters
SQL Script
Uses
Properties
Property
Value
ANSI Nulls On
Quoted Identifier On
Parameters
Name
Data Type
Max Length (Bytes)
@old_value
binary(16)
16
@new_value
binary(16)
16
SQL Script
CREATE
FUNCTION
dbo.is_different_binary
(
@old_value
binary
(
16
),
@new_value
binary
(
16
))
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