1. Increase:
Insert into Values (value, value, value ...) Insert into Values (Value, value, Value ... ), (value, value , value ...) Insert into Select from table
2. Delete:
Delete from Table Delete from where id=1 and name='Alex'
3. Modification:
Update Set ' Alex ' where ID>1
4. Enquiry:
Select * from Table Select * from where > 1 Select as from where > 1
5. Supplement
A, conditionsSelect * fromTablewhereId> 1 andName!= 'Alex' andNum= A; Select * fromTablewhereIdbetween 5 and -; Select * fromTablewhereIdinch( One, A, -) Select * fromTablewhereId not inch( One, A, -) Select * fromTablewhereIdinch(SelectNid fromtable) b, wildcard charactersSelect * fromTablewhereName like 'ale%' -all (multiple strings) beginning with the aleSelect * fromTablewhereName like 'Ale_' -Ale begins with all (one character) C, limitSelect * fromTable limit5;-Top 5 rowsSelect * fromTable limit4,5;-5 lines starting from line 4thSelect * fromTable limit5Offset4 -5 rows starting from line 4th D, sortSelect * fromTableOrder byColumnASC -arrange from small to large according to "column"Select * fromTableOrder byColumndesc -arrange from large to small according to columnsSelect * fromTableOrder byColumn 1desc, column 2ASC -rank from large to small according to column 1, if same, sort by column 2 from small to large e, groupSelectNum fromTableGroup byNumSelectNum,nid fromTableGroup byNum,nidSelectNum,nid fromTablewhereNid> Ten Group byNum,nidOrderNiddesc SelectNum,nid,Count(*),sum(score),Max(score),min(score) fromTableGroup byNum,nidSelectNum fromTableGroup byNum having Max(ID)> Tenin particular:Group byMust be in the Where,OrderBy before F, no correspondence between the table is not displayedSelectA.num, A.name, B.name fromA, bWhereA.nid=B.nid No corresponding relationship is not displayedSelectA.num, A.name, B.name fromAInner JoinB onA.nid=B.nid A table all display, if there is no corresponding relationship in B, the value is nullSelectA.num, A.name, B.name fromA Left JoinB onA.nid=B.nid B Table All display, if there is no corresponding relationship in B, the value is nullSelectA.num, A.name, B.name fromA Right JoinB onA.nid=B.nid G, combination of combinations, automatic processing of coincidentSelectNickname fromAUnion Selectname fromB combination, do not handle coincidentSelectNickname fromAUnion All Selectname fromB
mysql-Data manipulation-additions and deletions