--- title: "LongSequenceKey" slug: "longsequencekey" updated: 2022-02-10T19:30:49Z published: 2022-02-10T19:30:49Z canonical: "docs.datajet.app/longsequencekey" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # LongSequenceKey ## General: LongSequenceKey ## Produces a field that is the record number in a table, stored as a continuous long integer ## Purpose Use this function to: - Create a unique primary key on an existing table where the number of records may exceed 2 billion - Identify and select specific records by number ## Return Value | Property | Value | | --- | --- | | **FieldType** | LongInteger | | **FieldSize** | Continuous | | **DataType** | Continuous | | **DataSize** | LongInteger | ```shell Example Return Value: 1.....N where N = number of records in the table. ``` FieldSize and DataSize will depend on the number of records in the table: - LongSequenceKey will be a Continuous DataSize and FieldSize. See **FieldType and DataTypes** for more information. - LongSequenceKey is valid for a stupidly large number of records **(+- 263 -1)**. For tables larger than this, find a quantum computer… ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/Gen_LongSeqKey_Sample.PNG) ## Parameters | Parameter | JSON | Description | | --- | --- | --- | | **Table** | “targetTable”: “MyTableName” | The target table on which the new field will be created | | **Filter** | “dataset”: {DataSet_JSON} | **NOT USED** | | **Function** | "function":"longsequencekey" | LongSequenceKey | ## JSON Sample ```json { "method": "BuildBakedField", "project": "D3", "targetTable": "transactions", "overwrite": true, "name": "LongKey", "function": "longsequencekey" } ``` ## Usage Notes LongSequenceKey does not support filters. See Also: - Engineering | Expression Field - IntegerSequenceKey  (General Functions) - MakeContinuousKey (General Functions) ## Example | Example | Details | | --- | --- | | **Description** | **Create Unique Key of record number** | | **Input** | - Table: = [transactions] - *Filter: = [No Filter]* - **Function: = LongSequenceKey** - Name: = LongKey | | **Sample** | ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/Gen_LongSeqKey_Example.png) |