×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: T-SQL
Posted by: user2d6c2
Added: Jun 30, 2017 8:28 PM
Modified: Jun 30, 2017 9:14 PM
Views: 2
Tags: no tags
  1. SELECT
  2.         s.name AS SchemaName
  3.         , t.name AS TableName
  4.         , c.name AS ColumnName
  5.         , ty.name
  6.         , c.max_length
  7.         , c.precision
  8.         , c.scale
  9. FROM sys.columns c
  10. INNER JOIN sys.tables t ON t.object_id = c.object_id
  11. INNER JOIN sys.schemas s ON s.schema_id = t.schema_id
  12. INNER JOIN sys.types ty ON ty.user_type_id = c.user_type_id
  13. AND c.name LIKE '%loansta%'
  14. ORDER BY 2,3