Pierrot
Pierrot

Reputation: 19

Find all table with multiple columns name criteria

Through query page, I can search all tables where column == "something". Seems we're not able to make AND/OR from UI. So, I would like to know if there is a KQL query that can let search accross tables about column names with multiple criteria. Example : Finding all table where it contains one column named "Customer_ID" and one column named "mail" Thanks :)

Upvotes: 0

Views: 49

Answers (1)

Pierrot
Pierrot

Reputation: 19

I found the solution:

show database *db_name* schema 
| where ColumnName contains "xxx" or ColumnName contains "yyy" 
| summarize make_list(ColumnName) by TableName 
| where list_ColumnName contains "xxx" and list_ColumnName contains "yyy" 

Upvotes: 0

Related Questions