View previous topic :: View next topic
|
Author |
Message |
seema_vidya
New User
Joined: 24 Jun 2005 Posts: 5
|
|
|
|
If I have a table EMP (eno,ename,esal) and another table DEPT(deptno,deptname,deptcode) then if i want to retreive all the rows
from both the tables then what will be the query. I dont want to use
UNION ALL for that query. |
|
Back to top |
|
|
mdtendulkar
Active User
Joined: 29 Jul 2003 Posts: 237 Location: USA
|
|
|
|
seema_vaidya,
Code: |
SELECT ENO, ENAME, ESAL, DEPTNO, DEPTNAME, DEPTCODE FROM EMP, DEPT |
This will retrieve all the rows from both the tables
Hope this helps
Regards
Mayuresh |
|
Back to top |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
hi frnd,
hope the following query will do
1>>> SELECT E.*,D.*
FROM EMP E,DEPT D;
OR
2>>> SELECT E.ENO,E.ENAME,D.DNO,D.DNAME
FROM EMP E,DEPT D
WHERE E.DNO=D.DNO; |
|
Back to top |
|
|
|