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
Differentiate between SQL and ORACLE joins and write their syntax.
Explain system scalar functions?
Explain stored procedure?
How do I start sql server?
What are the different acid properties?
How to list all login names on the ms sql server?
What do you mean by recursive stored procedure?
Explain what is use of dbcc commands?
Tell about MOM Tool(Microsoft Operator Manager)?
What is a matrix in ssrs?
What do we need queues in sql service broker?
How do I find the sql server version?
How to call a function from a stored procedure in SQL Server ?
Mention the differences between sql server and mysql.
What is sub-query in sql server? Explain its properties.