with tb as (
select b.name sch ,a.name tb,
(select top 1 name from sys.all_columns c
where c.object_id=a.object_id )col
from sys.objects a join sys.schemas b
on a.schema_id=b.schema_id
and a.type='u' and
not exists
(select 1 from sys.objects
where type='pk' and parent_object_id=a.object_id)
)
select 'create clustered index dfd on'+quotename(sch)+'.'+quotename(tb)+'('+quotename(col)+')
on DT
drop index dfd on'+quotename(sch)+'.'+quotename(tb)+'
'
from tb