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

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -