zoukankan      html  css  js  c++  java
  • SQL语句

    虽然 SELECT 语句的完整语法较复杂,但是其主要的子句可归纳如下:

      SELECT select_list
      [ INTO new_table ]
      FROM table_source
      [ WHERE search_condition ]
      [ GROUP BY group_by_expression ]
      [ HAVING search_condition ]
      [ ORDER BY order_expression [ ASC | DESC ] ]
      可以在查询之间使用 UNION 运算符,以将查询的结果组合成单个结果集。
     
    也就是说,order by放在最后面。
    我实践过的那些sql语句
     
    access: SELECT * FROM (select * from AllStudent where quyu like "*绍兴*") where id >4000;
    asp:"select zhiye,count(zhiye) as total from Allstudent group by zhiye"
    asp: sql="select count(id) as total from Allstudent  where datediff('yyyy',birthday,now)>="&startAge&" and datediff('yyyy',birthday,now)<"&endAge
  • 相关阅读:
    wamp配置虚拟主机
    php单例模式
    YII缓存操作
    YII的延迟加载
    之字形打印二叉树
    对称的二叉树
    二叉树的下一节点
    删除链表的重复节点
    链表中环的入口
    字符流中第一个不重复的字符
  • 原文地址:https://www.cnblogs.com/seeking/p/3286423.html
Copyright © 2011-2022 走看看