ST_REGISTER_SPATIAL_COLUMN procedure

Use this stored procedure to register a spatial column and to associate a spatial reference system (SRS) with it.

Registering a spatial column associates a spatial reference system with the column. The association serves informational purposes, it does not prevent inserting data with a different spatial reference system.

Authorization

The user ID under which this stored procedure is invoked must have execution privilege on the procedure and hold one of the following authorities or privileges:
  • DBADM authority on the database that contains the table to which the spatial column that is being registered belongs
  • CONTROL privilege on this table
  • ALTER privilege on this table

Syntax

Read syntax diagramSkip visual syntax diagramST_REGISTER_SPATIAL_COLUMN( table_schemanull,table_name,column_name,srs_name)

Parameter descriptions

table_schema
Names the schema to which the table or view that is specified in the table_name parameter belongs. Although you must specify a value for this parameter, the value can be null. If this parameter is null, the value in the CURRENT SCHEMA special register is used as the schema name for the table or view.

The data type of this parameter is VARCHAR(128).

table_name
Specifies the unqualified name of the table or view that contains the column that is being registered. You must specify a non-null value for this parameter.

The data type of this parameter is VARCHAR(128).

column_name
Names the column that is being registered. You must specify a non-null value for this parameter.

The data type of this parameter is VARCHAR(128).

srs_name
Names the spatial reference system that is to be used for this spatial column. You must specify a non-null value for this parameter.

The data type of this parameter is VARCHAR(128).

Example

This example uses a Db2® CALL command to register the spatial column named LOCATION in the table named CUSTOMERS. This CALL command specifies the srs_name parameter value as NAD83_SRS_1:

call ST_REGISTER_SPATIAL_COLUMN(NULL,'CUSTOMERS','LOCATION', 'NAD83_SRS_1')