-
How many records in output
Two table 1) dept 2) emp both table having the following values.
deptid dept_name
100 sales
200 finance
300 hr
400 bbbb
empid empname deptid salary
1 a 100 1000
2 b 100 2000
3 c 200 1000
4 d 200 2500
5 e 200 1000
6 f 300 2000
the query is
select deptname
from dept a, emp b
where b.deptid=a.deptid(+)
group by a.deptname
having count(deptname)>=1
my question is the ouput of this query is how many records?
Question asked by visitor indiradharmaraj
-
Re: How many records in output
How many you are getting ?
-
Junior Member
Re: How many records in output
It should be 6 I believe.
-
Re: How many records in output
6 records will be retrieved. In this query outer join is used and there are six records where the dept id in both the tables are same, and the having clause says that only where the count of department is greater or equal to one.
-
Junior Member
Re: How many records in output
hi
u will get four records in the output
-
Junior Member
Re: How many records in output
there will be six records in the output.
-
Junior Member
Re: How many records in output
The output will be 3 records as we are grouping by Dept Name
-
Expert Member
Re: How many records in output
3 Records in output
Deptname
Finance
Hr
Sales
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules