Quantcast
Channel: Recent Edits
Viewing all articles
Browse latest Browse all 12198

Redundant Else Block

$
0
0
In the first example (A. Returning from a procedure) we don't need the ELSE statement, since: "Statements that follow RETURN are not executed."So another way to write will be:CREATE PROCEDURE findjobs @nm sysname = NULLAS IF @nm IS NULLBEGINPRINT 'You must give a user name'RETURNEND SELECT o.name, o.id, o.uidFROM sysobjects o INNER JOIN master..syslogins lON o.uid = l.sidWHERE l.name = @nm

Viewing all articles
Browse latest Browse all 12198

Trending Articles



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