USE THE TABLESAMPLE KEYWORD AFTER THE TABLE NAME.
Following queries retrieve random number of rows each time
SELECT * FROM TABLE_NAME TABLESAMPLE(100 ROWS)
SELECT * FROM TABLE_NAME TABLESAMPLE(10 PERCENT)
Search This Blog
November 13, 2014
November 12, 2014
How to get all tables row count in a database
The more effective way of getting all tables row count in a database is using sysindexes table. This will not do any table scans to get the values.
Following is the code to get the table name and row counts
Following is the code to get the table name and row counts
select so.name,si.rows from sysindexes si
inner join sysobjects so
on si.id = so.id
where si.indid=0 and so.type='u'
order by so.name
November 01, 2014
SSIS 2014 New Features
There are no new features introduced in SSIS 2014.
There are no changes to the existing features.
For more information check the MSDN link at http://msdn.microsoft.com/en-us/library/bb522534.aspx
Subscribe to:
Posts (Atom)