-1
create table dpt (
  deptno number, 
  dname varchar2(10), 
  loc varchar2(7)
)

create table emp1 (
  empno number,
  ename VARCHAR2(10),
  desigantion varchar2(10),
  mgr number,
  deptno number
)

结果1:

111 ram analyst 444 10
222 mohan   clerk   333 20
333 hari    manager 111 10
444 manju   engineer222 30

结果2:

10  inventory   hyd
20  finance         bglr
30  hr          mumbai

现在内部加入这两个表:

select * from emp1  inner join dept on emp1.deptno=dept.deptno

结果:

111 ram analyst 444 10  10  inventory   hyd
222 mohan   clerk   333 20  20  finance bglr
333 hari    manager 111 10  10  inventory   hyd

是否正确?

4

2 回答 2

0

No. You will get four rows. Means entire rows in tables (If having a joining row in the other table as well) unless otherwise there is a filter to throw out.

See you data here

于 2013-08-05T17:37:04.253 回答
-1
      select *.emp1,*.dept from emp1,dept when emp1.deptno=dept.deptno
于 2013-08-05T17:10:36.813 回答