Saturday, February 7, 2009

Get All Schema in Oracle and MySql

ORACLE
We can get all oracle schemas using the following query
SELECT username FROM all_users;
or
SELECT * all_users;


MYSQL
We can get all mysql schemas using the following query
SELECT SCHEMA_NAME FROM information_schema.SCHEMATA;
or
SELECT * information_schema.SCHEMATA;
or
show databases

No comments: