SELECT 
	t.name AS table_name,
	SCHEMA_NAME(schema_id) AS schema_name,
	c.name AS column_name,
	TYPE_NAME(system_type_id) AS data_type,
	c.max_length AS [length],
	CASE c.is_nullable
		WHEN 1 THEN 'NULL'
		ELSE 'NOT NULL'
	END AS [is_null]
FROM 
	sys.tables AS t
	INNER JOIN 
	sys.columns c ON t.OBJECT_ID = c.OBJECT_ID
WHERE 
	c.name = 'KD_UNIT_ORG'
	--AND TYPE_NAME(system_type_id) = 'date'
ORDER BY 
	schema_name, 
	table_name; 

