I want to create SQL variable table in stored procedure which include this;
Select a,b,c,d from **@tablename** where a=1 and c=0
How can do this with sp when creating sp?
You can declare table variable in SP as:
DECLARE @tablename TABLE(
a INT,
b INT,
c INT,
d INT);
SELECT * FROM @tablename;