i am trying to to something like if my database dont have the record, then insert it, the query below is my checking, the code have no errors, so i am not sure did i really make the checking ?
Record 1
IF NOT EXISTS ( SELECT 1 FROM TBL_AUDIT_LOG_TYPE WHERE AUDIT_LOG_TYPE_ID = 1 )
INSERT INTO TBL_AUDIT_LOG_TYPE ([AUDIT_LOG_TYPE_ID],[MODULE],[ACTION])
VALUES (1,'User','UserInfo')
Record 2
IF NOT EXISTS ( SELECT 1 FROM TBL_AUDIT_LOG_TYPE WHERE AUDIT_LOG_TYPE_ID = 2 )
INSERT INTO TBL_AUDIT_LOG_TYPE ([AUDIT_LOG_TYPE_ID],[MODULE],[ACTION])
VALUES (2,'User2','UserInfo2')