I have this code:
DECLARE @mytable TABLE (x INT);
EXECUTE ('SELECT * FROM ' + @mytable);
When I run the code, I get this error:
Must declare the scalar variable "@mytable ".
I know that @mytable variable is of type TABLE and it should be VARCHAR, but how to play around it?