Situatie
Mai jos este o procedura ce listeaza pe un server Microsoft SQL Server, toate tabelele de pe baza pe care este rulata, ce contin coloane definite ca TEXT sau NTEXT.
Solutie
create procedure ListTablesWithTextNtextColumns
as
SELECT [Table] = s.[Name] + N’.’ + t.[Name]
FROM [sys].tables t
JOIN [sys].schemas s ON t.[schema_id] = s.[schema_id]
WHERE EXISTS
(
SELECT 1 FROM [sys].columns c
WHERE c.[object_id] = t.[object_id]
AND c.system_type_id IN
(
35, 99
)
)
Leave A Comment?