Java-Data Manipulation-database

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.