<> Process control statement

<> similar java in if else sentence

<> similar java in switch case sentence

<> Aggregate function ( Cannot be nested MIN(AVG(salary)), But in oracle Li support )

Aggregate functions act on a set of data , And returns a value for a set of data . AVG(),SUM(),MAX(),MIN(),COUNT()

<>GROUP BY(SELECT The query field must be group by Field of , conversely ,group
by Fields declared in may not appear in SELECT in , However, if there is an aggregate function in the query field, it is OK )

<>HAVING Use of ( If the filter condition has an aggregate function , Put on where There will be problems in the , So it can only be placed in having in )

<>SQL grammar

<>SQL Statement execution

* First step : implement FROM
* Step 2 :WHERE Conditional filtering
* Step 3 :GROUP BY grouping
* Step 4 : implement SELECT Projection column
* Step 5 :HAVING Conditional filtering
* Step 6 : implement ORDER BY sort
<> Subquery

<> Related sub query

<>EXISTS And NOT EXIST keyword

<>MYSQL data type

<> Integer type

<> Date type

<> String type

<>char and varchar difference

<>text type

<>ENUM type

<>Set type

<> Binary type

<> Data type selection summary

<> constraint

<> Non NULL constraint

Set field not to when creating table null

<> Unique constraint (unique)

If a unique constraint is added to a field , This means that this value is unique in this table , A second identical value does not appear , But if you add to this field more than once null Time , It will not be limited , It will be inserted .

<> Compound unique constraint

<> Delete uniqueness constraint

<> Primary key constraint ( infer other things from one fact , There are compound unique constraints , There must also be a composite primary key constraint )

A table has only one primary key , The feature is non empty and unique

<> Foreign key constraint (FOREIGN KEY)

<> features

* A table can have multiple foreign keys
* When deleting data, delete the sub table before deleting the main table
* When a foreign key constraint is added, the corresponding normal index is created

<> Constraint level

<> Use of constraint levels

<> Delete foreign key

<> Development scenario ( Foreign key constraints are not recommended , Too limited )


<> What is a view ?

<> Create view
create VIEW View name as sql sentence
<> view a chart