![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sql
lizetorli
这个作者很懒,什么都没留下…
展开
-
mysql的一些排序技巧
col1col21null1111222null 1. col1是varchar类型的,对他进行排序,得到的顺序是1,2,11,12 ORDER BY col1+0 ASC 2. col2asc排序会出现null在前,如果想讓nul...原创 2012-02-02 14:13:12 · 99 阅读 · 0 评论 -
常用mysql
//主键 alter table tabelname add new_field_id int(5) unsigned default 0 not null auto_increment ,add primary key (new_field_id);//增加一个新列 alter table t2 add d timestamp; alter table infos add ...原创 2012-05-25 13:17:26 · 66 阅读 · 0 评论 -
mysql 去左右空格
RTRIM(LTRIM(字符串)) 去掉左右空格原创 2012-02-08 14:18:23 · 908 阅读 · 1 评论