Thank you for the script.
A question I ran the query on one of my databases.
I found one of the table named secPermission has duplicated indexes.
Both on PermissionID, and one of the indexes is of course Primary Key - clustered index
the other one is a non-unique, non-clustered on the permissionID.
I don't know why the developer did that, for me it is apparently wrong.
Is there a possibility that is correct? Thanks,
CREATE TABLE [dbo].[secPermission](
[PermissionID] [INT] IDENTITY(1,1) NOT NULL,
[PermissionNm] [VARCHAR](40) NOT NULL,
[PermissionDesc] [VARCHAR](120) NOT NULL,
[CreateDt] [DATETIME2](7) NOT NULL,
[CreatedBy] [VARCHAR](128) NOT NULL,
[ChangeDt] [DATETIME2](7) NULL,
[ChangedBy] [VARCHAR](128) NULL,
[DeactivationDt] [DATETIME2](7) NULL,
CONSTRAINT [PK_secPermission] PRIMARY KEY CLUSTERED