Skip to content

Instantly share code, notes, and snippets.

@NKid
Last active December 11, 2015 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NKid/5d28ae4588d020713c8b to your computer and use it in GitHub Desktop.
Save NKid/5d28ae4588d020713c8b to your computer and use it in GitHub Desktop.
SELECT * FROM Members --(xxx 個資料列受到影響)
--PRINT 'NO ROWS AFFECTED'
SELECT @@ROWCOUNT '@@ROWCOUNT'
--如果註解掉PRINT,那麼@@ROWCOUNT會輸出xxx
--反之,@@ROWCOUNT會輸出0
--IF、PRINT...都會影響@@ROWCOUNT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment