1
|
How to find all indexes associated with a table in Oracle
|
select index_name, table_name from all_indexes where
lower(TABLE_NAME)=lower(<your_table_name>) and OWNER='<owner>'
|
2
|
How to view DDL for any index in Oracle
|
select dbms_metadata.get_ddl('INDEX',<index_name> ','<owner>')
from dual;
|
3
|
How to view DDL for any view in Oracle
|
select dbms_metadata.get_ddl('VIEW',<view_name>,'<owner>')
from dual;
|
4
|
What to do when sqlplus is not displaying all lines in output
|
Run below on sqlplus prompt:
set heading off;
set echo off;
Set pages 999;
set long 90000;
|
5
|
How to edit a sql you previously ran on sqlplus prompt
|
Type ‘ed’ on prompt
SQL> ed
This will open a vi editor with your last sql query. Edit it and save
and exit
Type ‘r’ on prompt
SQL> r
This will run the updated sql.
|
6
|
How to run a sql script in sqlplus
|
@<fullpath of your sql>
|
7
|
How to find owner of a TABLE
|
SELECT OWNER, TABLE_NAME FROM ALL_TABLES where lower(TABLE_NAME) =
lower(<TABLE>);
|
To be Continued...
Comments
Post a Comment