我有下表:
create table my table (id SERIAL PRIMARY KEY,value TEXT);
我试图找到 serial 创建的序列:
SELECT sequence_schema, sequence_name
FROM information_schema.sequences
ORDER BY sequence_name ;
如何将列出的序列号与table.id
主键相关联?
我有下表:
create table my table (id SERIAL PRIMARY KEY,value TEXT);
我试图找到 serial 创建的序列:
SELECT sequence_schema, sequence_name
FROM information_schema.sequences
ORDER BY sequence_name ;
如何将列出的序列号与table.id
主键相关联?
您可以尝试“information_schema.columns”表