 <p>You can do this with a merge..output to a table variable followed by an update.</p> <p><a href="http://sqlfiddle.com/#!3/6c36a/3">SQL Fiddle</a></p> <p><strong>MS SQL Server 2008 Schema Setup</strong>:</p> <pre><code>create table Items ( ItemsId int identity primary key, ItemName nvarchar(50) not null, ItemsLanguageTextId int null ); create table ItemsLanguageText ( ItemsLanguageTextId int identity primary key, Text nvarchar(50) not null ); insert into Items values('Name 1', null); insert into Items values('Name 2', null); insert into Items values('Name 3', null); </code></pre> <p><strong>Query 1</strong>:</p> <pre><code>declare @T table ( ItemsId int, ItemsLanguageTextId int ); merge ItemsLanguageText as T using ( select ItemsId, ItemName from Items where ItemsLanguageTextId is null ) as S on 0 = 1 when not matched then insert (Text) values (S.ItemName) output S.ItemsId, inserted.ItemsLanguageTextId into @T; update Items set ItemsLanguageTextId = T.ItemsLanguageTextId from @T as T where T.ItemsId = Items.ItemsId; </code></pre> <p><strong><a href="http://sqlfiddle.com/#!3/6c36a/3/0">Results</a></strong>:</p> <p><strong>Query 2</strong>:</p> <pre><code>select * from Items; </code></pre> <p><strong><a href="http://sqlfiddle.com/#!3/6c36a/3/1">Results</a></strong>:</p> <pre><code>| ITEMSID | ITEMNAME | ITEMSLANGUAGETEXTID | -------------------------------------------- | 1 | Name 1 | 13 | | 2 | Name 2 | 14 | | 3 | Name 3 | 15 | </code></pre> <p><strong>Query 3</strong>:</p> <pre><code>select * from ItemsLanguageText; </code></pre> <p><strong><a href="http://sqlfiddle.com/#!3/6c36a/3/2">Results</a></strong>:</p> <pre><code>| ITEMSLANGUAGETEXTID | TEXT | -------------------------------- | 13 | Name 1 | | 14 | Name 2 | | 15 | Name 3 | </code></pre>