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
What extended events?
Explain the characteristics of a transaction server for example atomicity, consistency, isolation, durability?
You accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover?
What is Command line parameters in PLSQL.?
Why do we need normalization?
How do you start single user mode in clustered installations?
Where to find ntwdblib.dll version 2000.80.194.0?
When would you use it?
How do I get Report Builder to generate a parameter that can be set by users viewing the report?
What is scrollable cursor?
List the advantages of using stored procedures?
Can you index views?
Explain difference between cross join and full outer join?
What are system databases into sql server (2005/2008)?
Define outer join?