1. Create a temporary tablespace
Create temporary tablespace TS_TMP
TEMPFILE 'd: \ Oracle \ ORADATA \ TMP. dbf'
SIZE 32 M
AUTOEXTEND ON
NEXT 32 m maxsize 2048 M
Extent management local;
2. Create a data table space
Create tablespace TS_DATA
LOGGING
DATAFILE 'd: \ ORACLE \ ORADATA \ TMP \ DATA. dbf'
SIZE 32 M
AUTOEXTEND ON
NEXT 32 m maxsize 2048 M
Extent management local;
3. Create a user and specify a tablespace
Create user db identified by db
Default tablespace TS_DATA
Temporary tablespace TS_TMP;
4. grant permissions to users
Grant connect, resource to db;
5. Modify the table structure:
Add Field
Alter table docdsp add dspcode char (200)
Delete Field
Alter table table_NAME drop column column_NAME
Modify Field Type
Alter table table_name alter column column_name new_data_type
Rename
Sp_rename
Change the name of the user-created object (such as a table, column, or user-defined data type) in the current database.
Set the primary key:
Alter table yourtable add constraint PK_ID primary key (ID)