stored procedures - Will using a conditional variable negate execution plan retention and reuse -
i want write stored procedure in sql server utilizes "conditional variables". conditional, referring along these lines:
create procedure [dbo].[order_sel] @begindate datetime = null , @enddate = null = null begin select id , customerid , dateordered orders ( @begindate null or dateordered between @begindate , @enddate ) end
now, know 1 of benefits of using stored procedures execution plan retention , reuse. methodology used above negate advantage?
Comments
Post a Comment