--Create TABLE space-syntax: create tablespace table space name datafile ' path ' size 100M [aotuextend to];
Create tablespace myspace datafile ' d:/myspace/myspace.dbf ' size 100M autoextend on;
--Renaming Tablespace--syntax: Alter tablespace old name rename to new name;
Alter tablespace newspace Rename to MySpace; --Delete tablespace--[including contents cascade constraints] and delete the contained data and constraints-syntax: Drop tablespace tablespace name [including contents Cascade C
Onstraints];
Drop tablespace MySpace including contents cascade constraints;
--Create a temporary tablespace-syntax: Create temporary tablespace temporary table space name tempfile ' path ' size 100M;
Create temporary tablespace mytempspace tempfile ' d:/myspace/mytempspace.dbf ' size 20M; --Create a user and specify tablespace and temp table spaces create user Lisi identified by Lisi default tablespace myspace temporary tablespace myt
Empspace;
--A new user with no permissions, no connection--give users permission--permission to connect to the database grant create session to Lisi;
--Create TABLE permissions grant create table to Lisi; --Permissions to use tablespace Grant unlimited TABLESPACE to Lisi; --Create a user table created table Tb_user (u_id number primary key, U_name varchar2 (), U_pass varchar2 (20));
---view table space
SELECT * from V$tablespace;