There are situations where you would like to perform some operations on table based on certain conditions e.g. You would like to transfer some data from one table to another table but the condition is that should have less than 100 rows Trick: use if statement instead of taking temporary variable if ( (select count(*) from xyxTable with (nolock)) < 100) begin -- Do something end
Be the first to rate this post
Satalaj
I'm Satalaj.
↑ Grab this Headline Animator
Get notified when a new post is published.