DatabaseLink`
DatabaseLink`

SQLColumn

SQLColumn[]

represents a column in an SQL table.

Details

  • To use SQLColumn, you first need to load DatabaseLink using Needs["DatabaseLink`"].
  • The following options can be given:
  • "DataTypeName"Nonetype of the entry
    "DataLength"Nonemaximum length for variable length data
    "Default"Nonedefault value for column
    "Nullable"Falsewhether the entry can be null
    "PrimaryKey"Falseindicates a primary key column

Examples

open allclose all

Basic Examples  (1)

If you find that the examples in this section do not work as shown, you may need to install or restore the example database with the "DatabaseLink`DatabaseExamples`" package, as described in Using the Example Databases.

Open a connection:

List the columns in a table:

Select data matching a condition:

Use a prepared statement:

If you find that the examples in this section do not work as shown, you may need to install or restore the example database with the "DatabaseLink`DatabaseExamples`" package, as described in Using the Example Databases.

Options  (5)

"DataTypeName"  (1)

Specify data types for columns:

"DataLength"  (1)

Specify data lengths for appropriate types:

"Default"  (1)

Specify column defaults:

"Nullable"  (1)

Allow nullable column values:

"PrimaryKey"  (1)

Specify a primary key column: