1. Insert several fields from table T2 into table T1:
INSERT INTO T1 (t1.c1,..., t1.c5) Select T2.c1,..., t2.c5 from T2;
The time function in 2.MySQL:
Curdate () 2017-04-13
Now () 2017-04-13 09:09:09
3. Replace:
UpdateName of the tableSetthe name of the field to replace for this table=replace (the name of the field to replace for this table, 'Original Content', 'New Content')
4. Intercept the string:
SUBSTR (field name, nth bit start intercept, intercept m bit)
5. Delete:
Delete Records in table: Delete from table tablename where condition ... ;
Delete tables: drop TABLE tablename;
6. Positioning:
LOCATE (string, field name)--locates the position of the string in the data;
7. Find table 1, table 2, field 1 is the same, field 2 different data;
SELECT t1.* from person_lnfo T1 joins Person_lnfo T2 on T1.houseid=t2.houseid and t1.unitid<>t2. Unitid;
MySQL use of SQL statements-170413