ACCESS分组的sql语句如何写?

lss652019 2010-08-27 04:30:43
ACCESS分组的sql语句如何写?
...全文
203 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
lily747 2010-08-30
  • 打赏
  • 举报
回复
select type_id,message from t_case group by type_id,message
or
select type_id,count(message) from t_case group by type_id
总之,group by 后面必须是select中所有非函数字段
codecrusader 2010-08-28
  • 打赏
  • 举报
回复
group by 要把所有select 上的 列都放上。
ACMAIN_CHM 2010-08-27
  • 打赏
  • 举报
回复
ACCESS的知识体系
http://blog.csdn.net/ACMAIN_CHM/archive/2009/03/03/3954271.aspx

数据库设计基础
http://office.microsoft.com/zh-cn/access/HA012242472052.aspx

关于设计数据库
http://office.microsoft.com/zh-cn/access/HP051891362052.aspx

首次使用数据库的用户的入门方式
http://office.microsoft.com/zh-cn/access/HP051864092052.aspx
ACMAIN_CHM 2010-08-27
  • 打赏
  • 举报
回复
(不要高估你的汉语表达能力或者我的汉语理解能力)
建议你列出你的表结构,并提供测试数据以及基于这些测试数据的所对应正确结果。
参考一下这个贴子的提问方式http://topic.csdn.net/u/20091130/20/8343ee6a-417c-4c2d-9415-fa46604a00cf.html

1. 你的 create table xxx .. 语句
2. 你的 insert into xxx ... 语句
3. 结果是什么样,(并给以简单的算法描述)
4. 你用的数据库名称和版本(经常有人在MS SQL server版问 MySQL)

这样想帮你的人可以直接搭建和你相同的环境,并在给出方案前进行测试,避免文字描述理解上的误差。

changechange 2010-08-27
  • 打赏
  • 举报
回复
select type_id,message from t_case group by type_id

没有 COUNT SUM 等语句,你group by 来干嘛呢?

select type_id,count(message) from t_case group by type_id

还差不多
wwwwb 2010-08-27
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 lss652019 的回复:]
不行啊。
我是这样写的:
select type_id,message from t_case group by type_id
不知道正不正确。
[/Quote]
不正确
select type_id from t_case group by type_id
贴记录及要求结果出来看看
wwwwb 2010-08-27
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 lss652019 的回复:]
不行啊。
我是这样写的:
select type_id,message from t_case group by type_id
不知道正不正确。
[/Quote]
不正确
select type_id from t_case group by type_id
贴记录及要求结果出来看看
wwwwb 2010-08-27
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 lss652019 的回复:]
不行啊。
我是这样写的:
select type_id,message from t_case group by type_id
不知道正不正确。
[/Quote]
不正确
select type_id from t_case group by type_id
贴记录及要求结果出来看看
lss652019 2010-08-27
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 lss652019 的回复:]
不行啊。
我是这样写的:
select type_id,message from t_case group by type_id
不知道正不正确。
[/Quote]
要在access里面执行的分组sql语句.
lss652019 2010-08-27
  • 打赏
  • 举报
回复
不行啊。
我是这样写的:
select type_id,message from t_case group by type_id
不知道正不正确。

wwwwb 2010-08-27
  • 打赏
  • 举报
回复
记录是什么?
select id,sum(je) from tt group by id

7,713

社区成员

发帖
与我相关
我的任务
社区描述
Microsoft Office Access是由微软发布的关系数据库管理系统。它结合了 MicrosoftJet Database Engine 和 图形用户界面两项特点。
社区管理员
  • Access
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧