Search
 
SCRIPT & CODE EXAMPLE
 

SQL

How is the default tablespace determined when creating a table?

CREATE USER phil IDENTIFIED BY l33t
       DEFAULT TABLESPACE philtablespace
       TEMPORARY TABLESPACE philtemp;
       
       
If you omit the clauses when creating the user, the user will inherit the database default values. These can be queried as follows:

SQL> select *
  2  from database_properties
  3  where property_name like 'DEFAULT%TABLESPACE';

PROPERTY_NAME                  PROPERTY_VALUE       DESCRIPTION
------------------------------ -------------------- ----------------------------------------
DEFAULT_TEMP_TABLESPACE        TEMP                 Name of default temporary tablespace
DEFAULT_PERMANENT_TABLESPACE   USERS                Name of default permanent tablespace

SQL>
... and modified like so:

alter database default tablespace PHILTS; 

alter database default temporary tablespace PHILTEMP;
To query the default values for a given user, use the following query:

SQL> select USERNAME, DEFAULT_TABLESPACE, TEMPORARY_TABLESPACE
  2  from DBA_USERS
  3  where USERNAME='PHIL';       
Comment

PREVIOUS NEXT
Code Example
Sql :: showing all columns in an sqlite table 
Sql :: maximum number of tables in mysql 
Sql :: how to write query to to display record having maximum value 
Sql :: convert mongodb to sql 
Sql :: how change the field place in mysql 
Sql :: sql update table one column 
Sql :: firebase sql 
Sql :: Get the First and Last Word from a String or Sentence 
Sql :: OFFSET consulta mysql 
Sql :: find class =5 from list 
Sql :: Bigquery insert issue 
Sql :: psql 
Sql :: how to get button for every record from mysql 
Sql :: How to query data in many to many relationship in flask sql alchemy 
Sql :: tsql rename column name 
Sql :: practice sql queries 
Sql :: postgresql auto increment not working 
Sql :: in condition in sql 
Sql :: docker mysql connection refused 
Sql :: data structures in sql 
Sql :: retornar apenas o ano mysql date 
Csharp :: c# get current directory 
Csharp :: unity foreach child 
Csharp :: Unity Make a 2D object look at the mouse position 
Csharp :: check if gameobject is active 
Csharp :: c# remove last character from string 
Csharp :: movement script c# 
Csharp :: url()- full() laravel 
Csharp :: unity run void from another script 
Csharp :: unity log 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =