IDENTIFIER() function
IDENTIFIER()
is used with the INSERT INTO
statement and automatically generates unique numeric row values for the _id
column.
Before you begin
IDENTIFIER() requires:
- Table
_id
column assignedID
data type - One or more values to insert to table
Syntax
{IDENTIFIER('table_name', <value>,...)}
Arguments
Argument | Description | Data type |
---|---|---|
table_name | Table name stated in INSERT INTO statement | String data type |
<value> | Value to be inserted into subsequent column(s) stated in the INSERT INTO statement | FeatureBase Data types |
Additional information
IDENTIFIER()
increments by 1
each time the function is called, and retains this value in your cloud account regardless of user login.
A mismatched table name in the INSERT INTO
statement and IDENTIFIER()
function will cause unexpected results.
Returns
Data type | Value |
---|---|
ID | A numeric value starting at 1 |
Examples
Destination Table
CREATE TABLE auto-id
(_id id, color string);
INSERT INTO with identifier
function
INSERT INTO auto-id (_id, color)
VALUES (idenitifier('auto-id'),'green');
Verify results
select * from idtest; +—–+——–+ | _id | color | +—–+——–+ | 1 | green | +—–+——–+ ```