ruffyen

SQL Select Count Many Tables

Mar 12th, 2013
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.15 KB | None | 0 0
  1. SELECT
  2. ' select count(*) as ' + Name +'Counts
  3. from '
  4. + '[' + SCHEMA_NAME(schema_id) +'].'
  5. + '[' + name + ']'
  6. FROM sys.tables
  7. WHERE name like 'New%'
Advertisement
Add Comment
Please, Sign In to add comment