Blinkist app
SQL statements are case-insensitive, and most programmers prefer to use uppercase for SQL keywords, while for column names and indicating lowercase, easy to read and debug
Dividing SQL statements into multiple lines is easier to read and debug
Use less *, retrieving unnecessary columns can be a waste of performance
Don't spend time on things that you can spend money on.
specifically to differentiate the encoding:
ASCII code: An English letter equals one byte;
UTF-8 encoding: An English letter equals one byte;
Unicode encoding: An English letter equals two bytes.
Retrieval
SELECT ID as userId, name as username from users;
Insert in 3
INSERT into Table VALUES (NULL, ')
INSERT into Table VALUES (DEFAULT, ')
INSERT SET can use subqueries
INSERT SELECT to write the results of a lookup to a data table
In Update 2
Single table updates update users SET age = Age + ten WHERE id% 2 = 0;
Multiple table Updates
Delete in 2
Single-table Delete delete from
Multiple table deletions
Retrieval
SELECT ID as userId, name as username from users;
Group by groups The results of the query ASC default ascending DESC Descending, can be on a field, or ordinal, ordinal is the column field that appears after the first select
aggregate function, AVG MAX MIN because only one result will be returned at the end
MD5 (' 5 ')
SELECT Prod_name Prod_price
From Products
The above print out of the special magic, Prod_price as Prod_name alias. Print out the contents of the prod_name, a few commas. As can be used, or can not be used
sql--