If you can or can do with temporary tables or concrete tables you will have something similar to this:
Concrete table:
CREATE PROCEDURE MI_PROCEDIMIENTO
AS
CREATE TABLE #AuxAlumnos
(
Id int,
Nombre varchar (10),
Apellido varchar(10)
);
INSERT INTO #AuxAlumnos (ID,NOMBRE,APELLIDO)
SELECT ID,NOMBRE,APELLIDO
FROM Alumnos
Temporary Table:
CREATE PROCEDURE MI_PROCEDIMIENTO
AS
DECLARE @AuxAlumnos TABLE
(
Id int,
Nombre varchar (10),
Apellido varchar(10)
)
INSERT INTO @AuxAlumnos (ID,NOMBRE,APELLIDO)
SELECT ID,NOMBRE,APELLIDO
FROM Alumnos
then you just have to select the table you just created.
I hope it's your help
Greetings