--SELECT COUNT (*) FROM GDPRApproveCustomerXTab (NOLOCK)

DECLARE @ContentID INTEGER
DECLARE @TechotelID INTEGER

SELECT @ContentID = MIN(ID)
FROM GDPRApprove WITH (NOLOCK)
WHERE GDPRAPPROVALTYPE = 1 AND ENABLE = 1

SELECT @TechotelID = MIN(UserIdNumber) 
FROM Personel WITH (NOLOCK) 
WHERE UserTypeNumber = 2

DELETE FROM GDPRApproveCustomerXTab
WHERE 
  FK_GDPRApproveId = @ContentID AND
  FK_UserIdNumberApprove = @TechotelID