【转】[转]order by 1是什么意思?

ORDER BY 1 表示 所select 的字段按第一个字段排序 
ORDER BY ASC应该没有这样写法,ORDER BY 后面不是字段就是数字, 
可以ORDER BY 1 ASC 或者ORDER BY COL1 ASC

ASC表示按升序排序,DESC表示按降序排序

来源:http://doudouweed.blog.sohu.com/120271609.html

【转】[转]order by 1是什么意思?的更多相关文章

  1. 在UPDATE中更新TOP条数据以及UPDATE更新中使用ORDER BY

    正常查询语句中TOP的运用: SELECT TOP 1000 * FROM MP_MemberGrade   随意更新一张表中满足条件的前N条数据: UPDATE TOP (1) MP_Member ...

  2. BZOJ 1391: [Ceoi2008]order [最小割]

    1391: [Ceoi2008]order Time Limit: 10 Sec  Memory Limit: 64 MBSubmit: 1509  Solved: 460[Submit][Statu ...

  3. Android中的Libraries以及Order and Export的使用。

    1Add JAR 从Eclipse的现有所有工程中,添加jar包到该工程下 2Add External JARs 从Eclipse外的其他的位置,添加jar包到该工程下 3Add Variable 增 ...

  4. linux 环境下运行STS时 出现must be available in order to run STS

    linux 环境下运行ECLIPSE时 出现 “ A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be avai ...

  5. order by 与 group by 区别

    order by 排序查询.asc升序.desc降序 示例: select * from 学生表 order by 年龄 ---查询学生表信息.按年龄的升序(默认.可缺省.从低到高)排列显示 也可以多 ...

  6. 排序 order by 的用法

    order by  跟在select* from 后面 order by 默认的是升序, asc 升序  desc 降序 select * from 表名 order by  字段名  asc 在带有 ...

  7. Oracle update和order by

    今天遇到一个关于SQL转换成Oracle语句的问题,描述如下: select * from emp order by deptno; select * from dept; Sql Server: u ...

  8. Morris post order traversal algorithm

    Sept. 5, 2015 花时间把代码读明白, 比光看书强. 动手写代码, 改代码,  兴趣是最好的老师. 多记几个例子, 增加情趣. 举个例子关于中序遍历,            4       ...

  9. Leetcode, construct binary tree from inorder and post order traversal

    Sept. 13, 2015 Spent more than a few hours to work on the leetcode problem, and my favorite blogs ab ...

  10. [LeetCode] K-th Smallest in Lexicographical Order 字典顺序的第K小数字

    Given integers n and k, find the lexicographically k-th smallest integer in the range from 1 to n. N ...

随机推荐

  1. bzoj1072

    还是那句话s<=10 必然想到状压 题目唯一的难点在于怎么转移整除 整除即是mod d=0,我们用f[cur,j]表示选取状况为cur,余数为j的方案数 注意一个数a1a2a3…an (ai表示 ...

  2. clang failed with exit code 1 的常见情况

    1:文件重复,如生成了一份  xxx副本.m 2:reachablity.h 这个文件经常重复. 以上优先检查 .

  3. Unity3D游戏开发入门(一)

    视频: 慕课网适合入门 http://www.imooc.com/video/6582 蛮牛网: http://www.manew.com/ 圣殿中文手册 5.3.2破解工具 面试题 pdf 书籍:

  4. MySqlCommand, MySqlParameter and "LIKE" with Percent Symbol

    //Wrong way MySqlCommand cmd = oldDb.GetSqlStringCommand(CommandType.Text,"SELECT * _ FROM user ...

  5. 《使用wxWidgets进行跨平台程序开发》chap09——布局一个对话框

    ///////////////////////////////////////////////////////////////////////////// // Name: personalrecor ...

  6. Spark RDD/Core 编程 API入门系列之map、filter、textFile、cache、对Job输出结果进行升和降序、union、groupByKey、join、reduce、lookup(一)

    1.以本地模式实战map和filter 2.以集群模式实战textFile和cache 3.对Job输出结果进行升和降序 4.union 5.groupByKey 6.join 7.reduce 8. ...

  7. yii 权限分级式访问控制的实现(非RBAC法)——已验证

    验证和授权——官方文档: http://www.yiichina.com/guide/topics.auth http://www.yiiframework.com/doc/guide/1.1/zh_ ...

  8. Android Fragment 多标签应用

    1.使用Fragment 可以方便的替代TabActivity.ViewGroup 2.同时也省去了在AndroidManifest.xml文件中 添加相应的Activity 3.Fragment 是 ...

  9. Application使用示例

    MainActivity如下: package cn.testapplication; import android.os.Bundle; import android.view.View; impo ...

  10. 超强vim配置文件

    简易安装方法: https://github.com/ma6174/vim 打开终端,执行下面的命令就自动安装好了: wget -qO- https://raw.github.com/ma6174/v ...