Tag:rac definition Persistence sel its asc enc ini ble
1 Empty
SELECT ename from EMP WHERE MGR is NULL;
2 index
is not suitable for indexing
1. Columns that are rarely used or referenced
2. Columns with very few data values
3. Columns defined as image, text, bit data type
3 null change
1 if empty, take 2
ORACLE-NVL (EXPR1, EXPR2)
Mysql-ifnull (expr1, EXPR2)
4 Build Table
Generate a new physical table from an existing table-create TABLE table name as SELECT clause WH ere clause
Data type is not defined in new table
5DML
Data Manipulation Language-Data manipulation language-Select, UPDATE, INSERT, delete
Data Defi Nition Language-Database Definition language-create, alter, drop
Data control Language-Database Control Language-Grant, DENY, REVOKE
6 View
when DML operations are performed on a view, which is actually a DML operation on the base table
Views can simplify the writing of the query
view can restrict access to data
7 grouping and aggregation
Grouping-group by
Aggregation-count (), Max (), Min (), AVG (), sum ()
8having
To define the output of the finished data set with the having condition
"isolate each Dept_ The maximum salary value of the ID and the minimum salary value
and its maximum value is less than 5000 max is greater than 15000 "
Select dept_id, Min (Salary), MAX (salary) from Employees GROUP by dept_id
"
Having MIN (salary) < MAX (salary) > 15000; "
9CHR ()
Convert ASCII code to characters
SELECT CHR from Dual-b
Specify DUAL as a dummy table name in situations where no tables is referenced
10 Characteristics of the transaction
Atomicity
Atomicity, which means that a transaction is an inseparable unit of work, that either occurs in a transaction or does not occur
Consistency
Consistency, which means data integrity must be consistent before and after a transaction
Isolation
Isolated, concurrent transactions are isolated from each other
Durability
Persistence, once a transaction is committed, it changes the data in the database to be permanent
Java-Data Manipulation-database