SQLQuickfixes

Nothing loose by learning again. Definitely gain If you just don't let it go away. - Bvsc.

Pages

  • Home
  • SQL2012 - Denali
  • SQL Server 2014 - SQL14

Tuesday, March 7, 2017

Simple Dynamic SQL to get system tables information

Simple Dynamic SQL to get all tables row count from the database.
You have many number of ways to get this information.

SELECT 'SELECT COUNT(*) AS '+ name +' FROM ' + name AS TableName
FROM sys.tables


You can also apply the condition to the sort the data...
WHERE name like 's%'
Posted by PraveenSynick at 7:46 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Blog Archive

  • ►  2022 (1)
    • ►  March (1)
  • ►  2021 (1)
    • ►  December (1)
  • ►  2020 (2)
    • ►  February (2)
  • ►  2018 (1)
    • ►  August (1)
  • ▼  2017 (2)
    • ▼  March (1)
      • Simple Dynamic SQL to get system tables information
    • ►  January (1)
  • ►  2015 (12)
    • ►  June (1)
    • ►  May (1)
    • ►  April (5)
    • ►  March (2)
    • ►  February (1)
    • ►  January (2)
  • ►  2014 (10)
    • ►  December (4)
    • ►  November (2)
    • ►  October (1)
    • ►  May (1)
    • ►  April (1)
    • ►  February (1)
  • ►  2013 (12)
    • ►  December (1)
    • ►  November (5)
    • ►  April (5)
    • ►  January (1)
  • ►  2012 (14)
    • ►  December (3)
    • ►  November (5)
    • ►  October (6)

About Me

PraveenSynick
View my complete profile
Watermark theme. Powered by Blogger.