Press "Enter" to skip to content

Finding LOB Tables Lacking Primary Keys

Tom Collins is on the hunt:

Question: How can I find and report on SQL Server tables with LOB columns but where the table has no PRIMARY KEY?    I’m classing an LOB column as ‘TEXT’, ‘NTEXT’,’IMAGE’ ,’XML’, ‘VARBINARY’,’NVARCHAR(MAX)’ & ‘VARCHAR(MAX)’.

Read on for the answer.