I need to look for information in all columns of all MySQL tables, does anyone have a tip on how to assemble this SQL?

|
rotiman 2022-01-03 18:13:00
for example, I have a “car red” information, in which column of which table is this information.
rotiman 2022-01-03 18:13:54
tables column
table_example_1 column_example_1
table_example_2 column_example_2
table_example_3 column_example_3
MasterZiv 2022-01-03 18:15:04
rotiman 2022-01-03 17:13:44
Good Morning
I need to look for information in all columns of all MySQL tables, does anyone have a tip on how to assemble this SQL?
Thanks

This is impossible

rotiman 2022-01-03 18:51:09
MasterZiv 2022-01-03 18:15:04
This is impossible

SELECT CONCAT( ‘SELECT ‘, INFORMATION_SCHEMA.COLUMNS.COLUMN_NAME, ‘ AS RESULT_FOUND, ‘,
””, INFORMATION_SCHEMA.COLUMNS.TABLE_NAME, ””, ‘ AS TABLE_NAME, ‘,
INFORMATION_SCHEMA.COLUMNS.COLUMN_NAME, ‘ AS COLUMN_NAME ‘,
‘FROM ‘, INFORMATION_SCHEMA.COLUMNS.TABLE_NAME,
‘ WHERE ‘, INFORMATION_SCHEMA.COLUMNS.COLUMN_NAME, ‘ LIKE ‘, ‘ ”%45000%” ‘, ‘;’)

FROM INFORMATION_SCHEMA.COLUMNS
where INFORMATION_SCHEMA.COLUMNS.table_schema = ‘portal_site’
— AND INFORMATION_SCHEMA.COLUMNS.data_type IN (‘VARCHAR2′,’NVARCHAR2′,’NCHAR’,’CHAR’)
AND ((substring(INFORMATION_SCHEMA.COLUMNS.data_type, 1,4) like ‘VARC%’)
OR (substring(INFORMATION_SCHEMA.COLUMNS.data_type, 1,4) like ‘NVAR%’ ) )

Joshi_arnav_09 2022-01-03 20:09:40
Hlo
MasterZiv 2022-01-03 21:15:23
rotiman 2022-01-03 18:51:09
SELECT CONCAT( ‘SELECT ‘, INFORMATION_SCHEMA.COLUMNS.COLUMN_NAME, ‘ AS RESULT_FOUND, ‘,
””, INFORMATION_SCHEMA.COLUMNS.TABLE_NAME, ””, ‘ AS TABLE_NAME, ‘,
INFORMATION_SCHEMA.COLUMNS.COLUMN_NAME, ‘ AS COLUMN_NAME ‘,
‘FROM ‘, INFORMATION_SCHEMA.COLUMNS.TABLE_NAME,
‘ WHERE ‘, INFORMATION_SCHEMA.COLUMNS.COLUMN_NAME, ‘ LIKE ‘, ‘ ”%45000%” ‘, ‘;’)

FROM INFORMATION_SCHEMA.COLUMNS
where INFORMATION_SCHEMA.COLUMNS.table_schema = ‘portal_site’
— AND INFORMATION_SCHEMA.COLUMNS.data_type IN (‘VARCHAR2′,’NVARCHAR2′,’NCHAR’,’CHAR’)
AND ((substring(INFORMATION_SCHEMA.COLUMNS.data_type, 1,4) like ‘VARC%’)
OR (substring(INFORMATION_SCHEMA.COLUMNS.data_type, 1,4) like ‘NVAR%’ ) )

This is useless

MasterZiv 2022-01-03 21:17:52
rotiman 2022-01-03 18:51:09
SELECT CONCAT( ‘SELECT ‘, INFORMATION_SCHEMA.COLUMNS.COLUMN_NAME, ‘ AS RESULT_FOUND, ‘,
””, INFORMATION_SCHEMA.COLUMNS.TABLE_NAME, ””, ‘ AS TABLE_NAME, ‘,
INFORMATION_SCHEMA.COLUMNS.COLUMN_NAME, ‘ AS COLUMN_NAME ‘,
‘FROM ‘, INFORMATION_SCHEMA.COLUMNS.TABLE_NAME,
‘ WHERE ‘, INFORMATION_SCHEMA.COLUMNS.COLUMN_NAME, ‘ LIKE ‘, ‘ ”%45000%” ‘, ‘;’)

FROM INFORMATION_SCHEMA.COLUMNS
where INFORMATION_SCHEMA.COLUMNS.table_schema = ‘portal_site’
— AND INFORMATION_SCHEMA.COLUMNS.data_type IN (‘VARCHAR2′,’NVARCHAR2′,’NCHAR’,’CHAR’)
AND ((substring(INFORMATION_SCHEMA.COLUMNS.data_type, 1,4) like ‘VARC%’)
OR (substring(INFORMATION_SCHEMA.COLUMNS.data_type, 1,4) like ‘NVAR%’ ) )

You’d better make you a dump of all tables along with data, this would be even more useful than this.
You will be able to view this data in a text editor or a pager like less

rotiman 2022-01-03 23:23:15
MasterZiv 2022-01-03 21:15:23
This is useless

Do you have an example of how I can do this? Thank you

MasterZiv 2022-01-04 06:37:01
rotiman 2022-01-03 23:23:15
Do you have an example of how I can do this? Thank you

https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html

Sumit Jangra 2022-01-04 11:25:15
How can install mysql
flyingdragons 2022-01-04 15:06:36
Sumit Jangra 2022-01-04 11:25:15
How can install mysql

In Ubuntu

#MySQL 8
sudo apt-get install mysql-server-8.0

#MySQL 5.x
sudo apt-get install mysql-server

#MAC
brew install mysql

#Windows by using .exe directly from website (Community edition)

flyingdragons 2022-01-04 15:10:09
Hi everyone, how to improve performace of mysql?

Problem:

mysql instance is in USA, all users who are accessing from India are facing the lag when the web application in loaded.

Does creating the Slave mysql in Indian server work? If yes then how to know from which country the users are originating and make that user use Aisa / USA server use the database

zzss1938 2022-01-04 15:23:41
I think you should add a proxy layer to know where users come from
flyingdragons 2022-01-04 15:26:20
zzss1938 2022-01-04 15:23:41
I think you should add a proxy layer to know where users come from

If you have any reference for the same could you please share with me?

I havent configured proxies so far

A 2022-01-04 18:13:02
mysql_en-15506.jpg
Hello everyone!
Do you have any solution for this question?

Find first name and last name of the patients that have the most number of prescriptions.

A 2022-01-04 18:13:03
mysql_en-15507.jpg

πŸ‰[ĞøĐ ΓƒpĘX]πŸ²πŸ‰ ▄︻┻═┳一 2022-01-04 18:13:53
Plzzz
πŸ‰[ĞøĐ ΓƒpĘX]πŸ²πŸ‰ ▄︻┻═┳一 2022-01-04 18:14:00
It’s my requst
A 2022-01-04 18:21:23
https://sqlize.online/sql/mssql2017/4e3e1669253a840a8c5007818b9ddd60/

*************SQLIZE.online
A 2022-01-04 18:22:51
https://sqlize.online/sql/mssql2017/e66104a45e9cb28b6f385a6bf305dcf1/

Prescription.sql

*************SQLIZE.online
A 2022-01-04 18:24:01
https://sqlize.online/sql/mssql2017/13e0845db4c87490add1bf0b246a2306/

patient.sql

*************SQLIZE.online
A 2022-01-04 18:27:55
Still need help 😬
A 2022-01-04 18:36:59
Yes!! That works! Thank you so much!
It seem a professional solution and I was looking for a beginner one πŸ˜…
Thanks
madno 2022-01-04 21:56:19
Does Blackhole engine ignores binary logging of update statements
A 2022-01-04 22:44:16
Sure!
MasterZiv 2022-01-04 22:51:25
flyingdragons 2022-01-04 15:10:09
Hi everyone, how to improve performace of mysql?

Problem:

mysql instance is in USA, all users who are accessing from India are facing the lag when the web application in loaded.

Does creating the Slave mysql in Indian server work? If yes then how to know from which country the users are originating and make that user use Aisa / USA server use the database

Hardly this is related to India – USA net delay

MasterZiv 2022-01-05 00:12:49
Thank you!
MasterZiv 2022-01-05 00:12:49
HAVING is just WHERE after GROUP BY
MasterZiv 2022-01-05 00:12:49
WITH is not needed
MasterZiv 2022-01-05 00:12:49
I’m confused by Having and With statements
MasterZiv 2022-01-05 00:12:49
It’s a really basic query
MasterZiv 2022-01-05 00:12:49
Learn a bit
MasterZiv 2022-01-05 00:12:49
Nope, not at all
MasterZiv 2022-01-05 00:12:49
mysql_en-15538.jpg
Thank you but I tried this and did not get my desired result
Could you please help me by writing the query?
MasterZiv 2022-01-05 00:12:49
GROUP BY + HAVING
|