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 |
kjmraohyd
Starting Member
34 Posts |
Posted - 2006-06-21 : 04:42:12
|
Hi All,I want to build the query to get all duplicate (More than 1) columnnames defined in each table and to showup from all tables in a DB.I found one table has 2 columns with the same name and wonder how other tables are. We are in Pre Production Stage.I tried with Syscolumns, sysobjects with Having Clause but some how it's not working for me.TIAJaganmohan Rao |
|
mwjdavidson
Aged Yak Warrior
735 Posts |
Posted - 2006-06-21 : 04:48:00
|
SQL Server doesn't allow non-unique column names within a table Mark |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-06-21 : 04:48:44
|
>>I found one table has 2 columns with the same nameIt is not possible at allCan you post the table structure?This will show you list of tables and their columnsSelect table_name, column_name from information_Schema.columnsorder by table_name, column_name MadhivananFailing to plan is Planning to fail |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-06-21 : 04:51:33
|
is your database case sensitive ? If it is, SQL Server will treat column name with different case as differnet column KH |
 |
|
kjmraohyd
Starting Member
34 Posts |
Posted - 2006-06-21 : 06:02:51
|
Thanks All. It's a Case sensitive issue and has been resolvedJagan |
 |
|
|
|
|