A column name is given to you. You have to find out which table has that column. Database has 230 tables. For example: empid (column name) For this how do you find out which table has the column (empid) ?

Showing Answers 1 - 13 of 13 Answers

SDJ

  • Jul 13th, 2007
 

select sysobjects.name from sysobjects,syscolumns
where
sysobjects.id = syscolumns.id and
syscolumns.name like 'empid'

Kapil Kumar

  • Aug 17th, 2007
 

You can use this query as well

Select Object_name(ID) from Syscolumns where Name = 'Coulmn Name'

Regards,
Kapil

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions