1. database manipulation language DML: INSERT, UPDATE, DELETE
Database query language DQL: SELECT
Primary key: PRIMARY KEY shorthand: PK
Foreign key: FOREIGN KEY shorthand: FK
Check constraint: CHECK shorthand: CK
2. Data integrity constraints:
(1) physical integrity constraint: the data required for each row of the table are different entities reaction, the same data lines can not exist
(2) domain integrity constraints: the effectiveness of a given list of input
(3) a referential integrity constraint: row referential integrity constraints between tables are used to maintain the relationship defined in the input data or delete
(4) a custom integrity constraints: Custom integrity rules
3.sql statement:
(1) Insert: INSERT INTO table name VALUES (value)
(2) Review: UPDATE table SET column name = value
(3) Delete: DELETE FROM table name
(4) the query SELECT * FROM table
4. Connector:
(1) where: but (2) and: and
(3) or: or (4) is: is
(5) union: the joint (6) top: top
The operators and assignment operator:
(1) operators: + - * /%
(2) assignment operator / comparison operators: =
(3) Constraint: between A and then B: between (A and B)
6.char and varchar difference:
(1) char station and two kanji characters vachar
(2) nchar and nvarchar: kanji character accounts for a
7. commonly used functions:
(1) returns the length of a string: Len (String)
(2) get the current date computer: GETDATE ()
8. mathematical functions:
(1) 0-1 returns a random number (float): RAND ()
(2) the absolute value of: ABS (value)
(3) rounding: ROUND ()
9. aggregate functions:
(1) sum: SUM (value)
(2) averaging: AVG (value)
(3) selecting the maximum value: MAX (value)
(4) for the minimum: MIN (value)
(5) Total number of requirements: COUNT (value)
10. Fuzzy query LIKE symbols:
(1) _ (underscore): Indicates a character
(2)% (percent): The character of any length
(3) [] (brackets): The character in the specified range
(4) [^]: The character is not in the specified range
11. Sort ORDER BY:
(1) ASC: ascending
(2) DESC: descending
12. Grouped query GROUP BY:
(1) HAVING: Filters
Example:
Grouping columns SELECT name FROM table aggregate functions GROUP BY HAVING column name filters
13. join query:
(1) within the connector: INNER JOIN
(2) left join: LEFT JOIN
(3) Right connection: RIGHT JOIN