Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

i want table name basis on column name.

Answer Posted / bobby

select * from information_schema.columns where
column_name='orderid'

The above query is used to find all the tables and views in
the Database which contain ‘orderId’ as column name.

But to find only the tables in the Database which
contain ‘orderId’ as column name, use the below query.


select col.table_name from information_schema.columns Col
join information_schema.tables Tab
on col.table_name=tab.table_name and
col.column_name='orderId'and tab.table_type='Base Table'

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does any body please help me what question's have asked for SSRS in the interview?

2151


Explain atomicity?

1063


Explain multiserver query

1050


Define candidate key, alternate key, and composite key.

928


How should i optimize the time for execution of stored procedure having single input and many output from the different tables?

1920


What do you understand by physical_only option in dbcc checkdb?

981


Which are the important points to note when multilanguage data is stored in a table?

1004


What is best institute to Learn DotNET And SQL in chennai?

2164


What do we need queues in sql service broker?

1072


How to integrate the ssrs reports in application?

992


Mention the command used to rename the database.

1010


Explain how you can deploy an SSRS report?

150


What is the sql case statement used for?

1104


Explain sub-query?

959


What is join query?

899