1. Fuzzy query
Keyword "like"
% stands for any character
_ Represents a character
Like '%A ' is the last person in the name of a.
Like ' A% ' is the first character in the name of a person
Select from where like _b (%b) // Query the second character in the Test1 column in the test table is B data (contains B data)
2. View
Benefits:
1) Restricting access to the database
2) Simplified Query
3) Maintain the independence of data
4) Different views can be created for the same data
5) You can delete a view without affecting the data
Create [or replace] View as (Data to build the view) // as after can be implemented by the SELECT statement, delete the View drop V_test Select * from User_views // View data dictionary (the specific contents of the user's view) User_views is the system's table
3. Sequence
The method of constructing the sequence, which is usually used to assign a value to the primary key
CreateSequence Seq_test1//Create sequence Increment by 1 //1start per increase with 1 //starting position 1maxvalueTen //maximum value is 10minvalue1 //minimum value is 1cycle/Nocycle//Cycle/do not cycle the cache5 //In-memory cache of 5
Select from dual // querying the current value in the test1 sequence Select from dual // Query the next value of the test1 sequence (note that viewing the next value is equivalent to using it) dual // system table, which contains various information about the sequence
4. Index
Improve the speed of retrieving and querying data
Create Index on desc) // CREATE INDEX statement (details of self-Baidu, here is not deep) Select * from user_indexes // View Index
Databases: Fuzzy queries, views, sequences, indexes