No, your answer is wrong. That is the result of:
select * from a
UNION ALL
select * from a;
I don't have access to a DBMS that supports the NATURAL JOIN syntax at the moment, but it works like this:
PHP Code:
SQL> select * from dept;
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
SQL> select * from dept d1, dept d2
2 where d1.deptno = d2.deptno
3 and d1.dname = d2.dname
4 and d1.loc = d2.loc;
DEPTNO DNAME LOC DEPTNO DNAME LOC
---------- -------------- ------------- ---------- -------------- -------------
10 ACCOUNTING NEW YORK 10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS 20 RESEARCH DALLAS
30 SALES CHICAGO 30 SALES CHICAGO
40 OPERATIONS BOSTON 40 OPERATIONS BOSTON
Can you not try it yourself and see?