0

I have a db postgress and I need to find a value in all table:

For example: I have this value 'Alida' I need to obtain all tables names that contains column value 'alida'. I'm new and I don't know how i can do this? Anyone can help me?

Thom A
  • 88,727
  • 11
  • 45
  • 75
  • 1
    There is ***no*** native expression for searching all columns of all tables. You'd need to iterate over all table and columns yourself and check them, taking care not to check columns that are dates or integers, etc. Which begs the question; ***why*** do you need to do this? – MatBailie Jun 22 '21 at 13:51
  • Does this answer your question? [How to search a specific value in all tables (PostgreSQL)?](https://stackoverflow.com/questions/5350088/how-to-search-a-specific-value-in-all-tables-postgresql) – Serg Jun 22 '21 at 13:52
  • 1
    Your DBA will not like the way you go. What is the reason for this task? Database is not a text file to search in, each table has its own semantics and the same value may hold different information – astentx Jun 22 '21 at 14:04

0 Answers0