Finding the table’s tablespace and Changing the tablespace of table in oracle

SQL>Describe dba_tables; SQL>Describe dba_tablespaces; SQL>  select owner, table_name, tablespace_name   2   from dba_tables   3  where table_name=’EMP’;   OWNER                TABLE_NAME           TABLESPACE_NAME ——————– ——————– ————- SCOTT                EMP                  USERS POLL                 EMP                  USERS   First of all identify the tables which u want to move.. select owner,table_name,tablespace_name from dba_tables where owner = ‘HR’ Then move the tables u … continue reading


Difference between not in and not exists in oralce

Before moving to the difference between not in and not exists , i would like to say that its better to use not exists when these two result the same result for better performance. When you write a query using the NOT IN clause, you’re telling the rule-based optimizer that you want the inner query … continue reading


Oracle 10g VS 11g(LISTAGG) SQL

Hello Friend i have a table like EMPID SKILLS SUBSKILL —— ——————– ——————– 22 oracle dba 22 oracle plsql i want to output that EMPID SKILLS SUBSKILL —— ——————– ——————– 22 oracle dba,plsql Solution: SELECT EMPID, SKILLS,LISTAGG(SUBSKILL, ‘,’) WITHIN GROUP (ORDER BY SUBSKILL) AS SUBSKILLFROM TABLENAMEGROUP BY EMPID. This solution will work for oracle 11gR2 … continue reading

Visit Us On FacebookVisit Us On Google PlusVisit Us On Youtube