Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

don't want to use if then else and don't want to rewrite mostly same query twice

$
0
0
SQL
IF(@parameterISNULL)BEGINSELECT*FROMCUSTOMERENDELSEBEGINSELECT*FROMCUSTOMERWHERECUSTOMER_NAME=@parameterEND
In microsoft sql server, how can i write this stored procedure without using rewriting mostly same query twice.
Can i write this query in a better way ???


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>