Re: Which tablespace is the table in? newbie question

From: Doug Halke <halked_at_cesmtp.ccf.org>
Date: 1996/01/04
Message-ID: <4chj9r$l25_at_slider.bme.ri.ccf.org>#1/1


In article <4ch73b$s4s_at_pluto.cs.uah.edu>, mpruitt_at_pluto.cs.uah.edu (Michael Pruitt) says:
>
> I need to find out which tablespace a certain table is located
>in. I've been told that I can describe the table to find out, but I'm
>not sure how to describe. Any help would be appreciated. Thanks.
>
>--
>mpruitt_at_cs.uah.edu
>Michael Pruitt
>
>

Hi Mike,

DESCRIBE table_name; will list the column names and attributes for the columns in the given table.

DESCRIBE USER_TABLES (ALL_TABLES, or DBA_TABLES) will list the column names in these tables of tables. You should see a column called TABLESPACE_NAME and one called TABLE_NAME.

By issuing the following SQL statement you can find what you're looking for:

SELECT TABLESPACE_NAME
FROM one_of_the_above_tables
WHERE TABLE_NAME = 'your_table_name';

Be aware that if the table you're interested in is owned by somebody else, you have to add AND OWNER = 'owner_name' to your WHERE clause.

Hope this helps.

------------------------------------+------------------------------------
Doug Halke                          |  I may not know much about art,
halked_at_cesmtp.ccf.org               |  but I know what I like!
------------------------------------+------------------------------------
CCF and I don't speak for each other.
Received on Thu Jan 04 1996 - 00:00:00 CET

Original text of this message