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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 joining tables

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-05-05 : 08:59:19
sudeendra writes "Hi,

I have a table consider table1. If i do a query
select * from table1, it might return me 3 rows.These 3 rows values are the columns of the other table table2.

Now my question is how to select only those columns from table2?

Regards
Sudeendra"

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-05-05 : 09:07:08
not really sure what you want.

Maybe something like this :

select t2.*
from table1 t1 inner join table2 t2
on t1.col1 = t2.col1



KH

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-05-05 : 09:15:06
quote:
Originally posted by khtan

not really sure what you want.

Maybe something like this :

select t2.*
from table1 t1 inner join table2 t2
on t1.col1 = t2.col1



KH





No until you use Dynamic SQL.

sudeendra, why do you have this type of design?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -