create procedure [dbo].[select_column](@tablename varchar(20),@columnname varchar(20))as
begin
select @columnname from @tablename
end
Msg 1087, Level 15, State 2, Procedure select_column, Line 3
Must declare the table variable "@tablename".
I have read some documents on internet and understand what is problem behind it.but not getting sample code to solve this error.Tell me how can I use table name dynamically.
thanks in advance.
View Complete Post