DECLARE @fooid uniqueidentifier SET @fooid = (SELECT TOP 1 Id FROM Foo WHERE Name = 'Tom') INSERT INTO Bar (Id,Name,FooId) VALUES (N'fffed049-b03e-4d89-fffc-9f5100d8ed92','Jaeschke',@fooid)
No comments:
Post a Comment