How do I create a view in a stored procedure. The stored procedure is passed a parameter, for example an id, I will need to create the view name from this id and create the select statement using the id as a parameter in the where clause. How is this done?
create replace sp_create_view(p_id number)
string = 'create view dyn' + p_id ' as
from table where table.id = p_id;'