Created
October 24, 2019 13:35
-
-
Save mattmusc/fe7ff8b236f1402c6cdbf250d7f6a421 to your computer and use it in GitHub Desktop.
PL/SQL: Execute a statement for all tables starting with 'Prefix'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BEGIN | |
| FOR c IN ( select owner as schema_name, table_name from sys.all_tables where table_name like '--PREFIX--' ) | |
| LOOP | |
| EXECUTE IMMEDIATE ' SELECT * FROM ' || c.table_name; | |
| END LOOP; | |
| END; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment