找考题网-背景图
问答题

根据如下表的查询结果,求以下语句的结果。
SQL>select * from usertable;
USERID USERNAME
1 user1
2 null
3 user3
4 null
5 user5
6 user6
SQL>select * from usergrade;
USERID USERNAME GRADE
1 userl 90
2 null 80
7 user7 80
8 user8 90
执行语句:
(1) select count(*)from usergrade where username not in(select username from usertable);
(2) select count(*)from usergrade g where not exists(select null from usertable t where t.userid=g. userid and t.username=g.username);

【参考答案】

语句1的结果:0;语句2的结果:3。