Given a table:
CREATE TABLE [person] (
[id] INT IDENTITY(1,1) ,
[name] VARCHAR(100) ,
[age] INT
);
How nice would it be to be able to do something like this inside your stored procedures?:
DECLARE @person TABLE (
[name] typeof([person].[name]) ,
[age] typeof([person].[age])
);
Or, perhaps, declare something to be of type:
CREATE TYPE [dbo].[person] AS TABLE (
[name] typeof([person].[name]) ,
[age] typeof([person].[age])
);
Maybe you could even wrap it all up as:
CREATE PROC InsertPeople
@person [dbo].[person] READONLY
AS
BEGIN
INSERT [person]([name],[age])
SELECT [name],[age]
FROM @person;
END
You know what to do.
That is all!