The process of creating an instance of an Oracle database is similar to SQL Server creating a database, one instance of Oracle can correspond to more than one table space, one table space corresponds to one user, and a different table space is logged in according to different user names and passwords.
Therefore, after you create the table space, you create the user and specify the tablespace for it immediately. and authorized to the user, typically connect, resource, DBA authority
Grant Connect,resource,dba to Yun
Query database name:
Select name from V$database;
How to find the SID, system environment variables of the database
Select name from V$database;
When you create a database, you typically specify a SID:
Query the table space under the database:
SELECT * from Dba_tablespaces;
To delete a table space:
Drop tablespace test_data including contents and datafiles cascade constraints;
Querying users under a database
SELECT * from Dba_users;
To delete a user:
Drop user TEST2 cascade;
Cascade: Cascade
To create a table:
CREATE TABLE student (ID int,name VARCHAR (20))
Insert data:
INSERT into student values (1, ' Busan ')
To modify the data:
Update student set name= ' Zhangsan ' where id=1
Delete data:
Delete student where id = 2
Oracle Database Common SQL