Auflistung aller Tabellen ohne PrimaryKey

Für MS-Sql-Server:

select table_name
from INFORMATION_SCHEMA.TABLES
where
TABLE_NAME not in
(
select distinct table_name
from INFORMATION_SCHEMA.TABLE_CONSTRAINTS
where CONSTRAINT_TYPE = 'PRIMARY KEY '
)
and TABLE_TYPE = 'BASE TABLE'