Here is a query for the non-string type. The rest is left as an exercise for the reader:
DROP TABLE IF EXISTS #maxvalues
CREATE TABLE #maxvalues ("Schema" sysname NOT NULL,
"Table" sysname NOT NULL,
"Column" sysname NOT NULL,
value sql_variant NULL,
PRIMARY KEY ("Schema", "Table", "Column")
)
DECLARE @sql nvarchar(MAX)
SELECT @sql = string_agg(concat_ws(' ', convert(nvarchar(MAX), 'SELECT'), quotename(s.name, ''''), ' AS "Schema", ',
quotename(t.name, ''''), 'AS "Table",', quotename(c.name, ''''), ' AS "Column",',
'MAX(', quotename(c.name), ') FROM ', quotename(s.name), '.', quotename(t.name)),
nchar(13) + nchar(10)) WITHIN GROUP (ORDER BY s.name, t.name, c.column_id)
FROM sys.tables t
JOIN sys.schemas s ON t.schema_id = s.schema_id
JOIN sys.columns c ON t.object_id = c.object_id
WHERE type_name(c.system_type_id) NOT IN ('char', 'nchar', 'varchar', 'nvarchar', 'text', 'image', 'next', 'bit')
AND max_length > -1
PRINT @sql
INSERT #maxvalues
EXEC (@sql)
SELECT * FROM #maxvalues