Use the like operator in the where Condition
The wildcard "%" is used to represent 0 or more characters, while "_" is used to represent a single character.
Eg: Where ename like's % ';
Use the in operator in the where Condition
Eg: where Sal in );
Use the merge statement to modify data
Merge into Table1 using Table2 on Expression
When matched then update...
When not matched then insert ...;
Internal Connection
Select table1.column, table2.column from Table1 [inner] Join Table2 on table1.column = table2.column2;
Outer Join: an extension of the inner join. Not only all records meeting the connection conditions are returned, but also records that do not meet the conditions are returned.
Select table1.column, table2.column from Table2 [left | right] Outer Join Table2 no table1.column1 = table2.column2;
Outer left join eg: Where table1.column1 = table2.column (+ );
Start and end of a transaction
Start:
1. Connect to the database and execute a DML Statement (insert, update, or delete );
2. After the previous transaction ends, enter a DML statement;
Transaction ended:
1. Execute the commit or rollback statement
2. Execute DDL statements. For example, the create table statement automatically executes the commit statement;
3. Disconnect the database;
4. failed to execute a DML statement. Automatically rollback.
Syntax: savepoint savepoint_name;
Rollback to savepoint savepoint_name;
Data File: The file that stores the database data.
Learn about data files:
Desc dba_data_files;
Control File: A very small binary file used to describe the physical structure of the database.
Understand the control file information:
Select name from V $ controlfile;
Redo log file: a file that records all changes in the database.
Find out which log file group the system is currently using.
Select group #, members, status from V $ log;
Manually switch logs: Alter system switch logfile;
Oracle Process Structure
The combination of the global zone and the Oracle process is called an Oracle database instance.
The background processes of Oracle instances are as follows:
1. Database write process dbwn.
2. Log Writing Process
3. Checkpoint Process
4. system monitoring process
5. process monitoring process
6. Archiving Process
7. process recovery
8. Process Blocking
9. scheduling process
10. snapshot Process