Does MySQL have a database concept of "this"?

When writing a query, can I refer to the current database name, sort of like with the this keyword in Java? I am writing a script that I will use against several similar databases, and I need to query a table information_schema.KEY_COLUMN_USAGEwith a column CONSTRAINT_SCHEMAin my sentence WHERE.

+3
source share
1 answer

SELECT DATABASE()provides the selected database http://dev.mysql.com/doc/refman/5.0/en/creating-database.html

+3
source

All Articles