Skip to content

Instantly share code, notes, and snippets.

@klaaz0r
Created December 13, 2015 12:19
Show Gist options
  • Save klaaz0r/63dee7684949b861906e to your computer and use it in GitHub Desktop.
Save klaaz0r/63dee7684949b861906e to your computer and use it in GitHub Desktop.
Loading all the tables and columns from a oracle db
BEGIN
dbms_output.Put_line (USER
|| ' Tables in the database:');
FOR t IN (SELECT table_name
FROM user_tables) LOOP
dbms_output.Put_line(t.table_name);
FOR i IN (SELECT column_name
FROM user_tab_cols
WHERE table_name = t.table_name) LOOP
dbms_output.Put_line(i.column_name);
END LOOP;
END LOOP;
END;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment