--oracle Database Creation Table space
Create Tablespace New_taspace
--Table space name
DataFile ' D:\NEWTABLESPACE. DBF '-The data file and location associated with the Tablespace
Size 200M--File Initial size
Autoextend on next 20MB MAXSIZE 400MB; --File size can be expanded automatically, 20MB per expansion, Max 400MB
--Create Tablespace new_taspace1--table space associated data file and location datafile ' D:\NEWTABLESPACE1. DBF '--File Initial size 200M
--Log file
Logging
Extent Management Local
Segment Space management auto; --End with a semicolon
--Delete the table space Delete the physical files
Drop tablespace new_taspace including contents and datafiles
--Create User
Create User Orders
Identified by 123456
Default Tablespace new_taspace; --Create default tablespace for user
--Give the user a role
Grant Connect,resource to Orders
Grant DBA from Orders
--Revoke the user Administrator role
Revoke DBA from Orders
--Add permission to access a table
Grant SELECT on Tep to Orders
--Create a book table
CREATE TABLE book (
ID number (one) primary key,
BookName varchar2 () NOT NULL,
Price Number (11,2) is not NULL,
Storage number (one) NOT NULL
)
Oracle Database Creation Table Space