| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Can i use Select * from variable_name;
cheema says...
> I wonder can I select from some table such that table name is stored
> in a variable.i.e;
>
> DECLARE
> tablename varchar(5);
> BEGIN
> tablename:='table';
> select * from tablename;
> END;
Dynamic SQL. Google the documentation for "execute immediate".
GM Received on Sun Aug 19 2007 - 21:51:40 CDT
![]() |
![]() |