Creates a new database table. The column specification contains a column name, data type with an optional default and check constraint for each column in the table; with each column separated by a comma – using the same syntax as the column specification in a SQL CREATE TABLE statement.

Available in a network database and requires the star$define role.


Name Optional Type Description
table$ Mandatory Text The name of the database table to be created.
columns$ Mandatory Text Column specification for the table.
scope$ Mandatory Char Scope of the table.


SELECT create_table('mytable','id int,name text','L'); -- creates local table 'mytable' with two columns.


  • The star$tables view indicates which tables already exist and their scope
  • Qualify a table name with a schema if required in a specific schema
  • The scope$ parameter must have a value of L, G or C (for local, global or central scope)
  • The specification for a column is <name> <type> [<null>] [<default>] [<check>]


Have more questions? Submit a request


Article is closed for comments.

Powered by Zendesk