create table a (name char(2) not null, score int not null ) insert into a select 'aa','80'union select 'bb','90'union select 'cc','70'
怎么我这样写错了啊 请问错在哪 正确的要怎么写啊 select name,score,paiming=(select count(distinct a.score) from a where a.score>=score )SQL code: select name,score,paiming=(select count(distinct a.score) from a where b.score>=score ) from a b
请问 bancxc 为什么要用个b 啊 那个b代表什么啊
别名 与子查询作比较 对吗 b 就是 第二个from a b 中a的别名
子查询用的就是这个表 我这样写 能执行成功
select name,score,paiming=(select count(distinct a.score) from a where b.score <=score )