SQL, Mongodb and JDBC
- Use command below to execute an external sql file:
@[path+filename]
- Put a ';' at the end of a line or use command below to execute command of multiple lines:
COMMIT;
- List all the tables of the current user:
SELECT table_name FROM user_tables
- Delete all the tables of the current user: Execute the following command and spool the result of this query and execute it:
select 'drop table '||table_name||' cascade constraints;' from user_tables;
- Run the last command you saw:
/