Function createtabledb
Writing functions
createtabledb(dbid, table, columns [, types, [, options])
Where dbid is the name of the variable returned by the opendb function, table is a variable
or string representing the name of the table, columns is a block (i.e., a block layout) or an array representing a list of column names of the future table
This function creates a table with the required parameters and properties.
If this database is external, you also need to specify: types - a block (i.e., design as a block) or an array representing a list of column types of the future table
Type Representation:
Data type | String representation |
Byte | byte |
Short | short |
Integer | int |
Big Integer | bigint |
Float | float |
String | string |
Long String | longstring |
Time/Date | datetime |
Optional options parameter is a block (i.e. a block layout) or an array representing column parameters for an external database
separated by colons and representing column parameters:
Specification | Description |
null | The values in the column can take a NULL value |
notnull | The values in the column cannot take a NULL value |
primarykey | This column is the key |
autoinc | Auto-magnification when adding a new record |
default=value | This column will have the default value value if you need the value to contain a colon -
use the symbols "$#", for the dollar sign use the symbols "$$" |