TSQL is decimal an INT

Determine if a decimal number can be converted to an INT without any loss of precision. Check if either of the rightmost two digits are non-zero substring(convert(varchar(10), a.DebitAmount), len(convert(varchar(10), a.DebitAmount)) …

Select Tables with Row Count

TSQL –all tables and rowcount (in descending order by count) select ‘[‘+SCHEMA_NAME(t.[SCHEMA_ID])+’].[‘+t.NAME+’]’ AS [fulltable_name], SCHEMA_NAME(t.[SCHEMA_ID]) as [schema_name],t.NAME as [table_name] ,i.rows from sys.tables t INNER JOIN sysindexes i ON (t.object_id = …