Looping through dba_objects to alter table [message #344355] |
Fri, 29 August 2008 09:00 |
bogey
Messages: 53 Registered: February 2006
|
Member |
|
|
I'm trying to alter all the tables within a schema with the following:
for rec in (select OBJECT_NAME from dba_objects where owner='DANNY' AND OBJECT_TYPE = 'TABLE' AND OBJECT_NAME NOT LIKE '%$%') loop
alter table rec.object_name enable row movement;
end loop;
But I'm receiving this
ORA-00900: invalid SQL statement
Details:
for rec in (select OBJECT_NAME from dba_objects where owner='DANNY' AND OBJECT_TYPE = 'TABLE' AND OBJECT_NAME NOT LIKE '%$%') loop
Error at line 3
ORA-00900: invalid SQL statement
How can I loop through all the tables within a schema and execute an alter statement against that table?
thansk.
|
|
|
|