codecorner.galanter.net
@@ROWCOUNT is affected by IF statement
Let’s say you’re writing T-SQL code and need to make sure that your query returns one and only row. If no records returned – an error message needs to be shown. If more than one r…