cancel
Showing results for 
Search instead for 
Did you mean: 
Community Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

Find value in any column in a table

Adil
New Contributor

Hi,

I'm not sure if this is a possible scenario, but is there, by any chance a way to query all the columns of a table for searching a value? 

Explanation: I want to search for a specific value in all the columns of a databricks table. I don't know which column that value might be present, or not. I just am not sure what column holds that value. 

Thoughts?


1 REPLY 1

Kaniz
Community Manager
Community Manager

Hi @Adil, Certainly! When you need to search for a specific value across all columns in a table, you can use SQL queries to achieve this. You can construct a query that checks each column for the desired value.

 

Here are a few approaches you can consider:

 

Concatenating Columns:

Dynamic Query:

  • If you want a more dynamic solution, you can generate a query that searches across all columns without explicitly listing them.
  • This approach dynamically constructs a query to search for the specified value in all columns of the given table.