O'Reilly logo

Java Enterprise in a Nutshell, Second Edition by David Flanagan, Jim Farley, William Crawford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

DatabaseMetaData

Synopsis

The getMetaData() method of the Connection interface returns a DatabaseMetaData object that encapsulates non-connection-dependent information about the underlying database. A number of methods return ResultSet objects that should be treated like any other ResultSet.

DatabaseMetaData methods that accept String parameters with names ending in Pattern allow for simple wildcard searching. These methods treat the % character as matching any number of characters and the _ character as matching any single character. If these parameters are set to null, pattern matching is not performed.

public interface DatabaseMetaData {
// Public Constants
   public static final short attributeNoNulls;                   // =0, 1.4
   public static final short attributeNullable;                  // =1, 1.4
   public static final short attributeNullableUnknown;           // =2, 1.4
   public static final int bestRowNotPseudo;                     // =1
   public static final int bestRowPseudo;                        // =2
   public static final int bestRowSession;                       // =2
   public static final int bestRowTemporary;                     // =0
   public static final int bestRowTransaction;                   // =1
   public static final int bestRowUnknown;                       // =0
   public static final int columnNoNulls;                        // =0
   public static final int columnNullable;                       // =1
   public static final int columnNullableUnknown;                // =2
   public static final int importedKeyCascade;                   // =0
   public static final int importedKeyInitiallyDeferred;         // =5
   public static final int importedKeyInitiallyImmediate;        // =6
   public static final int importedKeyNoAction;                  // =3 public static ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required