Question: How can I change the database for code inspection?
Answered
SQL inspection works in IntelliJ IDEA. It automatically choose the database. How can I change the database for the inspection?

Please sign in to leave a comment.
Hit Cmd+Enter inside SQL fragment to run it and all available data sources will be listed in the popup.
See also https://www.jetbrains.com/help/idea/managing-data-sources.html
The question was about the "code inspection". I'm also irritated by the warnings coming from running against the wrong DB.
You need to set up SQL Resolution scope.