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


27.3.6.4 Schema Object

TheSchema object represents a database schema. You can obtain an instance ofSchema by calling theSession object'sgetSchema() method; you can also obtain a list of all available databases by callinggetSchemas().

Schema supports the methods listed here:

  • existsInDatabase(): Returnstrue if the schema exists, otherwisefalse.

  • getTable(Stringname): Returns theTable having the specifiedname.

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

  • getName(): Returns the name of theSchema (aString).

  • getName(): Returns theSchema itself.

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

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