Documentation Home
MySQL 9.2 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.7Mb
PDF (A4) - 40.8Mb
Man Pages (TGZ) - 259.6Kb
Man Pages (Zip) - 366.9Kb
Info (Gzip) - 4.1Mb
Info (Zip) - 4.1Mb


27.3.6.4 Schema Object

The Schema object represents a database schema. You can obtain an instance of Schema by calling the Session object's getSchema() method; you can also obtain a list of all available databases by calling getSchemas().

Schema supports the methods listed here:

  • existsInDatabase(): Returns true if the schema exists, otherwise false.

  • getTable(String name): Returns the Table having the specified name.

  • getTables(): Returns a a list of tables (Table objects) existing within this Schema.

  • getName(): Returns the name of the Schema (a String).

  • getName(): Returns the Schema itself.

  • getSession(): Returns the Session object corresponding to the current session.

The Schema object, along with its methods, was added in MySQL 9.2.0.