Home Forums SQL Server 2014 Development - SQL Server 2014 Identify objects that do not use an Identity Column but a Lookup Table to generate an Unique Identifier RE: Identify objects that do not use an Identity Column but a Lookup Table to generate an Unique Identifier

  • I would start by finding all of the objects that reference the lookup table.


    SELECT
      SchemaName = OBJECT_SCHEMA_NAME(sm.object_id)
    , ObjectName = OBJECT_NAME(sm.object_id)
    FROM sys.sql_modules sm
    WHERE sm.[definition] LIKE '%YourLookupTablename%'