Node.js 红移-不支持的类型“;连载;对于节点为orm-2的自动增量id
关于如何使自动增量id工作有什么见解吗?据我所知,默认情况下会添加id列;但是,由于我使用的是红移,默认的“串行”类型将无法工作,因为它不受支持Node.js 红移-不支持的类型“;连载;对于节点为orm-2的自动增量id,node.js,amazon-redshift,node-orm2,Node.js,Amazon Redshift,Node Orm2,关于如何使自动增量id工作有什么见解吗?据我所知,默认情况下会添加id列;但是,由于我使用的是红移,默认的“串行”类型将无法工作,因为它不受支持 { [error: Column "probe.id" has unsupported type "serial".] name: 'error', length: 165, severity: 'ERROR', code: '0A000', detail: undefined, hint: undefined, posit
{ [error: Column "probe.id" has unsupported type "serial".]
name: 'error',
length: 165,
severity: 'ERROR',
code: '0A000',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: '/home/awsrsqa/padb/src/pg/src/backend/parser/parser_analyze.c',
line: '3600',
routine: 'transformColumnDefinition',
model: 'probe' }
没有人支持这样的事情
{ [error: Column "probe.id" has unsupported type "serial".]
name: 'error',
length: 165,
severity: 'ERROR',
code: '0A000',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: '/home/awsrsqa/padb/src/pg/src/backend/parser/parser_analyze.c',
line: '3600',
routine: 'transformColumnDefinition',
model: 'probe' }
您只能获得:
标识(种子,步骤)
子句,指定列是标识
列。IDENTITY
列包含唯一的自动生成值。这些值以指定为种子的值开始,并以指定为步长的数字递增。IDENTITY
列的数据类型必须是INT
或BIGINT
对于GUID,您必须生成一个GUID并自己插入
示例:
创建您的表(
id INT标识(1,1)
);
是否有人可以添加一个SQL创建表示例?