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 logical database components? : SQL Server Architecture
Why is replication required on the sql server?
What purpose does the model database server?
How to reaname table name without using sp_Rename in sql server..?
How to use values from other tables in update statements in ms sql server?
How can i Relate Tables in SSIS
plss anybody specify tha constrian management system in dbms
What is the difference between getdate and sysdatetime?
What is query parameter in ssrs?
How to run sql server 2005 books online on your local system?
what is nonclustered index
What is the difference between a stored procedure and a user defined function?
What is difference between commit and rollback when used in transactions?
Describe different Processing Modes offered by SSRS?
Mention the different authentication modes in sql server.