hi gurus.
Newbie to Oracle.
I need to pass a table name as a parameter to a stored procedure and then select from that table.
In sql server this would require building / executing a string (code below). What would be the equivalent syntax in pl-sql?
Alternatively, can you use a variable table name in a select statement in pl-sql?
thanks!
Newbie to Oracle.
I need to pass a table name as a parameter to a stored procedure and then select from that table.
In sql server this would require building / executing a string (code below). What would be the equivalent syntax in pl-sql?
Alternatively, can you use a variable table name in a select statement in pl-sql?
Code:
create procedure blah @table nvarchar(255)
as
declare @command varchar(8000)
select @command = 'select * from '+@table
exec sp_executesql @command
thanks!