NEWID()
is actually a random GUID.
If you want to reuse it, e.g. when populating a child table, you can grab it again from the parent table, e.g. let's say you populate a country and then need to populate a state table:
INSERT INTO [dbo].[SysCountry] ([country_id], [country_name]) VALUES (NEWID(), 'Australia');
INSERT INTO [dbo].[SysState] ([state_id], [country_id], [state_name])
SELECT
NEWID(),
(SELECT [country_id] FROM [dbo].[SysCountry] WHERE [country_name] = 'Australia'),
'Victoria'
You can also use a local variable to do the same - the script will look better:
INSERT INTO [dbo].[SysCountry] ([country_id], [country_name]) VALUES (NEWID(), 'Australia');
DECLARE @id uniqueidentifier
SELECT @id = [country_id] FROM [dbo].[SysCountry] WHERE [country_name] = 'Australia'
INSERT INTO [dbo].[SysState] ([state_id], [country_id], [state_name])
VALUES (NEWID(), @id, 'Victoria')
INSERT INTO [dbo].[SysState] ([state_id], [country_id], [state_name])
VALUES (NEWID(), @id, 'New South Wales')