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
 General SQL Server Forums
 New to SQL Server Programming
 find out similar columns

Author  Topic 

gongxia649
So Suave

344 Posts

Posted - 2007-04-19 : 13:49:47

i like to write a sql query to find out similar columns in different tables.

i have something like this. but my logic is wrong.

select *
from information_schema.columns a
join information_schema.columns b
on a.column_name = b.column_name
and a.table_name <> b.table_name

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2007-04-19 : 14:15:28
>>i like to write a sql query to find out similar columns in different tables.

That tell us nothing. You need to be specific and explain exactly what you want returned and with what criteria. You gave us only a sql statement that has "wrong logic" with no explanation whatsoever ... how can we guess what you really want given only that?



- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page
   

- Advertisement -