Tuesday, September 25, 2012

PRINT, CAST, and @@ROWCOUNT

PRINT CAST(@@ROWCOUNT AS varchar(32)) + ' rows'

 
 

Herein:

  1. PRINT will return a string.
  2. @@ROWCOUNT will return the number of rows affected by the last statement.
  3. CAST converts from one type to another.

No comments:

Post a Comment