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_Fatma
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.
Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!