is_column

Declaration

is_column (name: STRING): BOOLEAN

Description

Returns True if name is a column in the database. Use this function to check whether a column has been defined with create_column.

Note: If a profile is loaded, then the columns stored with the profile are restored and all columns created by the script are removed. Use is_column and create_column to restore columns that an older profile may have removed.

See Also

create_column
database functions
Database

Example

script setup_database is
  if not is_column ('section') then
    create_column ('section') -- user column
  end
end