开发者

Does MySQL have the concept of "this" database?

开发者 https://www.devze.com 2023-03-08 18:18 出处:网络
When writing a query, can I reference the current database\'s name, sort of开发者_开发百科 like with the this keyword in Java? I am writing a script that I will run against several similar databases,

When writing a query, can I reference the current database's name, sort of开发者_开发百科 like with the this keyword in Java? I am writing a script that I will run against several similar databases, and I need to query the information_schema.KEY_COLUMN_USAGE table with the CONSTRAINT_SCHEMA column in my WHERE clause.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消