Author |
Topic |
matiq12
Starting Member
7 Posts |
Posted - 2010-01-28 : 05:48:32
|
how to view different columns having same name from different tables in same database..kindly help.. |
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2010-01-28 : 05:53:53
|
Use alias name!Select a.userid,b.userid from user_master a inner join dept b onb.userid=a.useridSenthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-28 : 06:32:06
|
quote: Originally posted by matiq12 how to view different columns having same name from different tables in same database..kindly help..
do you mean this?select * from information_schema.columns where column_name='your column name' |
|
|
matiq12
Starting Member
7 Posts |
Posted - 2010-01-28 : 07:12:32
|
thx a lot senthil_ and visakh for ur help.. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-01-28 : 07:26:20
|
quote: Originally posted by matiq12 thx a lot senthil_ and visakh for ur help..
Both of them provide you completely different solutions. Which is related to yours?MadhivananFailing to plan is Planning to fail |
|
|
matiq12
Starting Member
7 Posts |
Posted - 2010-01-28 : 07:35:28
|
i have executed the query u gave Senthil it is executed but it is not getiing the result it jus shows the coloumn name no data. soory too annoy u but if possible kindly help me with tht.. THX for ur corrporation |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-28 : 07:43:06
|
quote: Originally posted by matiq12 i have executed the query u gave Senthil it is executed but it is not getiing the result it jus shows the coloumn name no data. soory too annoy u but if possible kindly help me with tht.. THX for ur corrporation
so u were looking for data? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-01-28 : 10:23:13
|
quote: Originally posted by matiq12 i have executed the query u gave Senthil it is executed but it is not getiing the result it jus shows the coloumn name no data. soory too annoy u but if possible kindly help me with tht.. THX for ur corrporation
Have you tried Visakh's query?MadhivananFailing to plan is Planning to fail |
|
|
matiq12
Starting Member
7 Posts |
Posted - 2010-01-28 : 11:44:27
|
ya i have tries tht but its not getting the data in those column:S |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2010-01-28 : 12:44:37
|
Can you clearly what exactly is your requirement?Do you need to see 'data' in those columns or just find out the tables in the database that have the same name you search for? |
|
|
matiq12
Starting Member
7 Posts |
Posted - 2010-01-28 : 15:24:30
|
i wan to see data from those columns having same name in different tables |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-01-29 : 02:11:08
|
quote: Originally posted by matiq12 i wan to see data from those columns having same name in different tables
Why do you want to do this?MadhivananFailing to plan is Planning to fail |
|
|
matiq12
Starting Member
7 Posts |
Posted - 2010-01-29 : 04:19:12
|
thx all ofu for ur corporation i have got my dessired result thx for ur corporatin & help i have done it by using alias name... |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-01-29 : 07:48:23
|
quote: Originally posted by matiq12 thx all ofu for ur corporation i have got my dessired result thx for ur corporatin & help i have done it by using alias name...
Post the working codeMadhivananFailing to plan is Planning to fail |
|
|
|