In a function in SQL Server is there a way to create a table and assign the value of a query to it, something like
CREATE TABLE AuxAlumnos
(
Id int,
Nombre varchar (10),
Apellido varchar(10)
);
And to that table assign the value of aSELECT * FROM Alumnos
You can do the following:
If it can or can be done with temporary tables or concrete tables, you will have something similar to this:
Concrete table:
Temporary Table:
then you just have to do the select to the table you just created.
I hope it is helpful
Cheers
What do you want to do exactly? the question is not clear.
Maybe you want to do something like:
If so, yes it can be done.