I have a stored procedure in Sql Server 2008
with below body, that inserts car then gets it:
ALTER PROCEDURE [dbo].[sp_Car_Insert]
@RunDate VARCHAR(25),
@CarNo NVARCHAR(50),
@Volume INT,
@Weight SMALLINT,
@CarName NVARCHAR(50),
@InUse BIT,
@CarID TINYINT OUTPUT
AS
BEGIN
SELECT @CarID = ISNULL(MAX(c.CarID), 0) + 1
FROM Car c
INSERT INTO Car
(
CarID,
RunDate,
CarNo,
Volume,
[Weight],
CarName,
InUse,
IsDeleted
)
VALUES
(
@CarID,
@RunDate,
@CarNo,
@Volume,
@Weight,
@CarName,
@InUse,
0
)
SELECT *
FROM Car
WHERE CarID = @CarID
END
I want to know if there is a way to get selected Columns headers info in T-SQL or not? Is there any solution to get them?
For example: we can get headers of function tables by INFORMATION_SCHEMA.ROUTINE_COLUMNS
table. Is there any info in sql server
to get procedures returned headers?