Monthly Archives: July 2009

SQL Tables without primary key

— buscar tablas que no tengan clave primaria

— find tables without primary key

select name

  from sysobjects

 where xtype = ‘U’

   and id not in (select parent_obj

                    from sysobjects

                   where xtype = ‘PK’)