- 积分
- 137
- UID
- 14727
- 阅读权限
- 20
- 注册时间
- 2013-10-18
- 精华
- 在线时间
- 小时
- 最后登录
- 1970-1-1
- 职业
- 1
|
/*
create table tb0A
(
u_id int not null,
kemu int not null,
socre int not null
);
insert into tb0a(u_id,kemu,socre)
values(1,1,80);
insert into tb0a(u_id,kemu,socre)
values(1,2,75);
insert into tb0a(u_id,kemu,socre)
values(1,3,90);
]*/
/*
这是小弟网上看到的一个group by语句后跟一个这样的条件对结果有影响,请问各位大神,这句话该如何理解,比如说他的其他让人看的懂的写法,
*/
select kemu,socre from tb0a group by 1=0;--这句话能把表中数据全部查出来
select kemu,socre from tb0a group by 1=1;--这句话只能把第一条(80)数据给查出来
select kemu,socre from tb0a group by socre > 75;--这句话只能将(80,75)查出来;
请问各位大神,group by 后面跟这些条件该如何理解?希望能翻译成平凡人的写法;
|
|