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 |
|
u2p_inst
Yak Posting Veteran
78 Posts |
Posted - 2002-07-23 : 23:13:50
|
| DEAR ALLcan i join 2 tables without have a foreign key??oh |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-07-23 : 23:23:34
|
| Yes. |
 |
|
|
u2p_inst
Yak Posting Veteran
78 Posts |
Posted - 2002-07-25 : 01:58:20
|
| how?oh |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
|
|
dataphile
Yak Posting Veteran
71 Posts |
Posted - 2002-07-25 : 11:13:42
|
| select l.field1, r.field1from lefttable l inner join righttable r on l.field1 = r.field1Same as if you had a foreign key on field1.However your referential integrity might be a @#$%@#$%so you might have to play around with "left outer join""right outer join" and "full outer join"until you understand you clean or dirty the data is. |
 |
|
|
u2p_inst
Yak Posting Veteran
78 Posts |
Posted - 2002-07-26 : 02:57:43
|
| thanks alloh |
 |
|
|
|
|
|