Required Parameters
- driver: The JDBC driver class name in the cross-platform edition or the ADO.NET provider name in the .NET edition.
- conn: The connection string or database URL.
- table: The table or view from which to list the columns.
Optional Parameters
- schema: The name of the database schema in which the table resides. The schema is commonly referred to as the namespace of a group of tables.
- catalog: The catalog in the database server. This is commonly referred to as the database. If you do not provide a value, columns from all catalogs in the database server are returned.
Output Attributes
- db:columnname: The name of the column in the specified table or view.
- db:datatype: The SQL data type of the column in the specified table or view.
- db:columnsize: The size of the column in the specified table or view.
- db:iskey: Boolean (true or false) indicating if the column is the primary key column.
- db:nullable: Boolean (true or false) indicating if the column is nullable.
- db:readonly: Boolean (true or false) indicating if the column is read-only.
- db:autoincrement: Boolean (true or false) indicating if the column is an autoincrement column.
Example
In this example, the targeted database server is MySQL and the targeted table isactor. Notice that there is no database parameter in the connection string: if the database is specified in the connection string, the catalog parameter is not required. This script writes all the attributes of the target table to an output file.
driver and conn inputs as follows: