Query Tablespace from user_tables : tablespace « Table « Oracle PL/SQL Tutorial






SQL>
SQL> select default_tablespace
  2  from user_users;


DEFAULT_TABLESPACE
------------------------------
SYSTEM

SQL> create table foo (
  2  a int );

Table created.

SQL>
SQL> select table_name, tablespace_name
  2  from user_tables
  3  where table_name = 'FOO';


TABLE_NAME                     TABLESPACE_NAME
------------------------------ ------------------------------
FOO                            SYSTEM

SQL> drop table foo;

Table dropped.

SQL>
SQL> create table foo (
  2  a int )
  3  tablespace users;

Table created.

SQL>
SQL> select table_name, tablespace_name
  2  from user_tables
  3  where table_name = 'FOO';


TABLE_NAME                     TABLESPACE_NAME
------------------------------ ------------------------------
FOO                            USERS

SQL> drop table foo;

Table dropped.








6.19.tablespace
6.19.1.Move table to another tablespace
6.19.2.Query Tablespace from user_tables