Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai,

how to Identify Field Name Example "ProductId" in this table?

FieldName Database
Productid aaa-DB

i know only Database.

Here 100 Tables is there.

how to Identify "Productid" is which Table?

Thanks ,
Karthikeyan,Bangalore.
Posted

1 solution

Do you want to find the table which contains the column name 'productid'?
If yes, than you can try this query:

SQL
SELECT name FROM sysobjects WHERE id IN ( SELECT id FROM syscolumns WHERE name = 'COLUMN_NAME' )
 
Share this answer
 
Comments
pkarthionline 4-Feb-11 10:05am    
Thanks,
For Your Helps.

Karthikeyan,Bangalore.
Manfred Rudolf Bihy 4-Feb-11 10:09am    
You beat me to it. 5+
pkarthionline 4-Feb-11 10:22am    
Thanks...
Manas Bhardwaj 4-Feb-11 10:45am    
np :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900