order by 排序后面是可以添加多个排序方式的,优先级是从左到右,例如
--先对c.county降序排列,然后再a.corp进行升序排列,最后再对a.time 降序排列select * from table1 a INNER JOIN table2 b ON a.corp = b.corp and a.code = b.code INNER JOIN table3 c ON a.corp = c.corp where 1=1
order by c.county desc,a.corp asc,a.time desc
使用MYSQL -I命令,查看MYSQL命令的参数,其中对--auto-rehash参数的说明如下:--auto-rehash Enable automatic rehashing. One doesn&#39t need to use &#39rehash&#39to get table and field completion, but startup and reconnecting may take a longer time. Disable with --disable-auto-rehash. 网上也找了一些资料,说是打开MYSQL的自动补全功能,类似于LINUX的TAB键补全功能。但如下使用该参数后,输入SQL命令,中途按TAB健,并未出现自动补全的效果,不知道如何 *** 作: [sql] C:\Users\qxlmysql -u root --auto-rehash Welcome to the MySQL monitor. Commands end with or \g. Your MySQL connection id is 29 Server version: 5.1.28-rc-community MySQL Community Server (GPL) Type &#39help&#39or &#39\h&#39for help. Type &#39\c&#39to clear the buffer. mysql use test Database changed mysql select * from newnam欢迎分享,转载请注明来源:内存溢出
评论列表(0条)