I think should do itCREATE PROCEDURE [dbo].[Content_CreateContentByNameAndCulture]@ContentName NVARCHAR(100),@ContentCulture NVARCHAR(5),@ContentHtml NVARCHAR(MAX)ASSET NOCOUNT ON;DECLARE @ContentId UNIQUEIDENTIFIER;SELECT @ContentId = ContentId FROM dbo.Content WHERE ContentName = @ContentNameIF @ContentId IS NULLBEGIN SET @ContentId = NEWID(); INSERT dbo.Content (ContentId, ContentName) VALUES (@ContentId, @ContentName) INSERT dbo.ContentLocalized (ContentId, ContentCulture, ContentHtml) VALUES (@ContentId, @ContentCulture, @ContentHtml)ENDELSEBEGIN IF EXISTS (SELECT * FROM dbo.ContentLocalized WHERE ContentId = @ContentId AND ContentCulture = @ContentCulture) UPDATE dbo.ContentLocalized SET ContentHtml = @ContentHtml WHERE ContentId = @ContentId AND ContentCulture = @ContentCulture ELSE INSERT dbo.ContentLocalized (ContentId, ContentCulture, ContentHtml) VALUES (@ContentId, @ContentCulture, @ContentHtml)END