易截截图软件、单文件、免安装、纯绿色、仅160KB
热门标签: c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 最新文章 :

请教SQL语句怎么写?

例表如下:

姓名      部门        职级      工资等级

张三      1          A          01
李四      2          A    ......

一sql语句能实现吗

  数据
  |Field1| Field2|  Field3|
  | F1  |  x1        1
  | F2  |  xx1        3
  | F1  |  x1        2
  | F1  |  x2      & ......

sql用户数据统计

我有一个表,里面包含有很多用户每次的摇奖记录,

username      d1    d2

aa            4      5

bb            4      2

aa          & ......

这条SQL怎么优化

SQL code:

SELECT cls.*, yplan.*
from Mpt_CostItem cls INNER JOIN
Mpt_YearPlan yplan ON cls.CostItem_ID = yplan.YearPlan_ItemID
GROUP BY yplan.YearPlan_ItemID
ORDER BY yplan.YearPlan_ID

上面的语运行肯定是通不过的如果改成这样
SQL code:

SELECT max(cls.字段), max(yplan.字段)
f ......

关于exec(@sql)问题求解

exec ( 'select  sum(JiHua_Count) from JiHua_Msg where'+ @SqlWhere)

执行存储过程时,一直报 “第 1 行: '2009-11-02' 附近有语法错误。 ” 不知道该如何解决?


参数 @SqlWhere 的内容是 IsDelete=0  and ( JiHua_Time between '2009-11-02' and  '2009-1 ......

怎么写这个SQL的求和语句

select a.strno,a.strnam,b.sum(score) from
(select strno,strnam from name where strnam >2) a,
(select strno,sum(score) from score where strdate>'1-1月-2009' group by strno having sum(score)>300) b
where a.strno=b.strno group by a.strno,a.strnam

表A中是学号和学名,表B ......
总记录数:27572; 总页数:4596; 每页6 条; 首页 上一页 [3596] [3597] [3598] [3599] 3600 [3601] [3602] [3603] [3604] [3605]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号