1. update、delete 操作
【错误内容】:Error Code: 1093. Table '表名' is specified twice, both as a target for 'UPDATE' and as a separate source for data
【错产生经过】:update t_test1 set col1= col1_value where val1 in(select val1 from t_test2 group by val1);
【解决办法】:update t_test1 set col1= col1_value where val1 in(select * from (select val1 from t_test2 group by val1) as T);
2.tinyint 范围
tinyint使用1字节保存数字,带符号的范围是-128到127。无符号的范围是0到255。不要想当然的就以为999用tinyint能存下,使用之前,还是要好好调查下的。