Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
PRIYA.CYNTHIA
Starting Member
3 Posts |
Posted - 2008-08-29 : 13:34:07
|
| Hi all,How can we fetch data from more than one table, without using joins?? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-29 : 13:38:54
|
| yup you can. using union all is another method. but it really depends on your requirements. without knowing that its hard to tell. |
 |
|
|
DavidChel
Constraint Violating Yak Guru
474 Posts |
Posted - 2008-08-29 : 14:07:57
|
| Um... don't consider myself an expert but you can use the where clause instead. select * from TableA, TableB where TableA.field = TableB.field. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-29 : 14:12:13
|
quote: Originally posted by DavidChel Um... don't consider myself an expert but you can use the where clause instead. select * from TableA, TableB where TableA.field = TableB.field.
you're still using join above. its another way of representing join. its just that syntax is not the ANSI join syntax. |
 |
|
|
DavidChel
Constraint Violating Yak Guru
474 Posts |
Posted - 2008-08-29 : 14:27:09
|
quote: Originally posted by visakh16
quote: Originally posted by DavidChel Um... don't consider myself an expert but you can use the where clause instead. select * from TableA, TableB where TableA.field = TableB.field.
you're still using join above. its another way of representing join. its just that syntax is not the ANSI join syntax.
Hence, I prefaced it wtih "don't consider myself an expert". |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-29 : 14:34:15
|
quote: Originally posted by DavidChel
quote: Originally posted by visakh16
quote: Originally posted by DavidChel Um... don't consider myself an expert but you can use the where clause instead. select * from TableA, TableB where TableA.field = TableB.field.
you're still using join above. its another way of representing join. its just that syntax is not the ANSI join syntax.
Hence, I prefaced it wtih "don't consider myself an expert". 
no worries you'll shortly become one |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2008-08-29 : 15:06:15
|
| [code]select * from TableA select * from TableB[/code]CODO ERGO SUM |
 |
|
|
|
|
|