Question

CREATE TABLE ts_pcode_tb_incase
    TABLESPACE USERS
    AS
    SELECT *
      FROM ts_pcode_tb;

What is the use of tablespace in the above query?

Was it helpful?

Solution

A tablespace is a logical group of data files in a database. A database typically contains at least one tablespace, and usually two or more. Within the database, the tablespace plays a role similar to that of a folder on the hard drive of a computer.

Some database programs, such as Oracle, automatically create a tablespace called SYSTEM that contains general information about the structure and contents of the database. A small database can be entirely contained in the SYSTEM tablespace, but in most cases, user data is placed in other tablespaces.

The files in a tablespace usually share a common characteristic. For example, a database for a wholesale distributor might consist of tablespaces entitled ACCOUNTING, ORDERS, SHIPPING, SERVICE, and SYSTEM. Each tablespace might contain only one data file, or thousands of files, or anything in between. Tablespaces can be created, deleted, and merged, just as can the folders on the hard drive of a computer.

Reference...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top