DECLARE @sql nvarchar() DECLARE @cou int SET @sql='INSERT INTO people values('''+'xiaohong'+''');select @temp=@@IDENTITY' EXEC sp_executesql @sql, N'@temp int out', @cou OUT INSERT INTO child VALUES(@cou, '小兰') CREATE PROC chjj @name nvarchar() AS BE…