|
| Total Answers and Comments: 9 |
Last Update: July 14, 2009 Asked by: sm |
|
| | |
|
No best answer available. Please pick the good answer available or submit your answer. | |
August 02, 2006 10:34:46 | #8 |
| dmadhusudhanarao |
|
Member Since: August 2006 Contribution: 7 |
RE: what is the result ofselect * from table1, t...
| assume that 2 table are emp dept now write query like this select * from emp dept the out put is emp has 14 records and dept has 4 records then output is 14x4 56 records you will simply. |  | | Is this answer useful? Yes | No | | |
|
| |
|
July 14, 2009 02:49:42 | #9 |
| jaspreet.nagra |
|
Member Since: July 2009 Contribution: 3 |
RE: what is the result ofselect * from table1, table2there is a common column between them but no where caluse has been specified
| Assume you have following two tables:
SQL> select * from aa; DAT NAME ---- -------- 1 Amit 2 Jas
SQL> select * from bb; DAT ANAME ---- --------- 1 Delhi 3 Mumbai
The following SQL will give me 4 rows SQL> select * from aa bb; DAT NAME DAT_1 ANAME ---- ------- ------- --------- 1 Amit 1 Delhi 2 Jas 1 Delhi 1 Amit 3 Mumbai 2 Jas 3 Mumbai
Now if any of the 2 table having 0 rows then the result will : No rows selected. As in Oracle any addition multiplication division and joining two tables with one as null the output will only be as Null.
To have natural join we need to do following:
SQL> select * from aa natural join bb; DAT NAME ANAME --- ------ ------- 1 Amit Delhi
I hope this will help.
|  | | Is this answer useful? Yes | No | | |
|
| |
Go To Top
|