[MySQL] various pits - continuously updated

Chinese garbage problem

In the construction of the table when additional execution

ALTER TABLE camera CONVERT TO CHARACTER SET utf8; 

If that does not pay attention to look at the precision, to 2, when prone? ? Thus, the need to re-run a ALTER operation.

 

Scheduling

If the row order by the values ​​of a plurality of the same, when this sort of security to maintain the order of the column lines is not in the original sequence, and therefore requires both a row order and by the need to maintain the same value of the row in order to maintain the original when the need to order by id once.

Questions about the sort of multiple fields can refer to multi-field sorting

Note that a high priority should be placed in front of the field, e.g.

SELECT * FROM students st ORDER BY st.sAge ASC, st.sGrade DESC, st.sStuId DESC;

Will first sorted by age, age grade in accordance with the same sort, grade and then follow the same sort id.

Guess you like

Origin www.cnblogs.com/Ryan16231112/p/11849448.html