IF NOT EXISTS
(
	SELECT 1
	FROM [dbo].[tblTable01]
	WHERE column01 = '123'
)
BEGIN;
	INSERT INTO tblTable01([column01],[column02]) VALUES (123,'Book123');
END;
ELSE PRINT '123 RECORD EXISTS IN tblTable01';
GO
Last modified: May 13, 2019

Author

Comments

Write a Reply or Comment