Search the entire database

Asked

Viewed 10,718 times

1

Is it possible to query or is there a phpmyadmin tool that does this:

Query the entire database for example:

I have the value 23600 and I want him to find that value in the entire bank independent of the table or field in which he is.

  • Silvio, that LINK, contains a very detailed example of how to do this. The article is in English, but it is very practical. I recommend that you index the fields that are relative to the research, ie the ones that should be more relevant, to gain a little more performance in this case.

  • This video helps to do this search intelligently by searching all columns of all tables. https://youtu.be/r_8WYFQBTtg

2 answers

8


In phpMyAdmin, use the search feature:

  • Select the Data Base
  • Click on the search tab ("Search")
  • Choose the terms you want to search for
  • Choose the tables you want to search for
  • Go!

inserir a descrição da imagem aqui

  • I guess that’s right, I’m just doing some tests.

  • I thought it was something related to your application do this search :)

  • No, it is only to know the origin of such value and it worked, worth!

0

SELECT DISTINCT TABLE_NAME 
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE COLUMN_NAME IN ('CampoParaBuscar')
        AND TABLE_SCHEMA='SeuBancoDeDados';
  • 2

    Can you explain why your answer solves the problem? so others can learn from it

  • It only takes the names of the tables.

  • Camila, welcome to [pt.so]! Feel free to ask and respond in our community. However, I suggest you try to be more detailed in your answers, avoiding just putting a chunk of code, explaining how it works and checking if it really answers what you were asked. I suggest reading about how to create a good answer. Hug!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.