Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » UltraLite - Database Management and Developer Guide » UltraLite SQL reference » SQL functions » Functions

DB_PROPERTY function [System]

Returns the value of the specified database property.

Syntax
DB_PROPERTY( 
{  property-id |  property-name }
[, database-id | database-name ] 
)

UltraLite:

DB_PROPERTY( property-name )
Parameters
  • property-id

    The database property ID.

  • property-name

    The database property name.

  • database-id

    The database ID number, as returned by the DB_ID function. Typically, the database name is used.

  • database-name

    The name of the database, as returned by the DB_NAME function.

Returns

VARCHAR, LONG VARCHAR

Remarks

Returns a string.

The current database is used if the second argument is omitted.

UltraLite: To set an option in UltraLite, use the SET OPTION statement or your component's API-specific Set Database Option method.

Privileges

No privileges are required to execute this function for the current database. To execute this function for other databases, you must have either the SERVER OPERATOR or MONITOR system privilege.

NULL is returned if you specify an invalid parameter value or don't have one of the required system privileges.

UltraLite: These privileges do not apply to UltraLite.

Standards
  • ANSI/ISO SQL Standard

    Not in the standard.

Example

The following statement returns the page size of the current database, in bytes:

SELECT DB_PROPERTY( 'PageSize' );

UltraLite: The following statement returns the page size of the current database, in bytes:

SELECT DB_PROPERTY( 'page_size');