0

I have multiple databases and I need to search for a value in a table and set it to NULL in all instances across all databases.

I know how to query individual databases after "USE 'DBName'" is called to select a particular database.

How do I loop all databases?

1 Answer 1

2

Use the SHOW DATABASES query to list all databases.

You don't need to USE the database to query its tables:

SELECT something FROM databasename.sometable
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.