tsql - Return BIT constant from SQL Stored Procedure -
ok, i'm trying return bit constant stored procedure.
the way i've managed compile using cast:
cast(0 bit) mybool
is there more efficient way write without cast?
some people prefer following
declare @true bit,@false bit set @true = 1 set @false = 0
and use @true
or @false
remainder of query.
i imagine post compilation difference in efficiency between 2 methods vanishingly small can safely write in whatever style prefer.
Comments
Post a Comment