postgresql 删除数据,并且序号恢复从1开始

浪淘沙7个月前数据库129
TRUNCATE TABLE tpl_template_class RESTART IDENTITY;
ALTER SEQUENCE tpl_template_class_id_seq RESTART WITH 1;


相关文章

PostgreSQL数据库允许其他IP连接到数据库(Windows & Linux)

https://blog.csdn.net/h1773655323/article/details/142454517...

给表加备注

EXEC sys.sp_addextendedproperty @name=N'MS_Description',@level1type=N'TABLE...

postgresql 修正全部表格的自增id,为最大

SELECT   format(     'SELECT setval(%L, COALESCE((SELE...

postgersql 多表联合查询

select zph_chrq.qyid,zph_chrq.lxdh as phone,qy.qymc from zph_chrq INNER  join qy on zph_chrq.qy...

迁移 qx 表到 qy schema

ALTER TABLE public.qx SET SCHEMA qy;...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。