SQL语句应用纪录 [原]

Written by EEQ on 五月 9th, 2006

今天有需要用到一些SQL的运算语句,所以便顺便上来写一下作个纪录,以后不用再翻书了,呵呵!
所选列的中间值
select count(列名) as cou from 表名 where 条件列名='条件'
所选列的平均值
select avg(列名) as av from 表名 where 条件列名='条件'
所选列中的最大值:
select max(列名) as ma from 表名 where 条件列名='条件'
先择列中的最小值:
select min(列名) as mi from 表名 where 条件列名='条件'

本文永久链接:http://www.iteeq.com/archives/81


评论 »

还没有评论呢。

姓名 (必填)
电子邮件 (required - never shown publicly)
URI
您的评论 (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

使用新浪微博登陆