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 are three ways you can use an identity value inside a trigger? Why would you prefer one way over another?
Define tool Manage Statistics in SQL Server 2000 query ?
What are the advantages of partitioning?
Explain indexing and what are the advantages of it?
What are the main sources of data?
How to recreate an existing index in ms sql server?
Write a program to fetch first 10 records from a file?
How to change a login name in ms sql server?
What are “lock” hints?
What is the difference between Stored Procedures and triggers?
What are the different types of subquery?
How to change server name in sql server?
How to bind a view to the schema of the underlying tables?
Sql server reporting services vs. Crystal reports.
What do you understand by SQL*Net?