Forum Discussion
QUESTION::SQL ENDPOINT::INFORMATION_SCHEMA::QUERY RETURN NOTHING
Why do the following 2 TSQL queries return an empty result set? Also nothing with a WHERE clause on a table name in the LH.
SELECT *
FROM INFORMATION_SCHEMA.VIEW_COLUMN_USAGE
SELECT *
FROM INFORMATION_SCHEMA.VIEW_TABLE_USAGE
- Anonymous2 years ago
8 Replies
- AnonymousNot applicable
Hi Element115
Thanks for using Fabric Community.
If you have any views in the lakehouse, then the queries will return some data.
For example:
I had no views in Lakehouse_2:
In other case I created a view in another lakehouse:
Hope this helps. Please let me know if you have any other questions.- Element115Memorable Member
Oh I am sorry. It's the column and table usage of any VIEWS. I was reading this as the verb 'to view' the column and/or table usages of tables, not views. Need another coffee. 😁 I have no views, so ofc it's empty. Thanks.
- Element115Memorable Member
Actually, I take back my previous answer. I just tried running both TSQL queries on a LH that has a view, and as you can see in my screenshot, it does not work on my end:
- AnonymousNot applicable
Hi Element115
How did you create the view? Can you please share the code here?
If you create the view using the tables present in lakehouse, then it would be shown in the sql query result.