One - One Code All

Blog Content

postgresql 清除数据并清除自增ID

PostgreSQL   2017-05-13 11:12:06

单纯清除数据的方法
– 清除所有的记录(有外键关联的情况下)
TRUNCATE TABLE questions CASCADE;

– 清除所有的记录,并且索引号从0开始
TRUNCATE TABLE questions RESTART IDENTITY CASCADE;



上一篇:十五个全球最顶级的专业调音台品牌!
下一篇:微信小程序wx.request请求服务器json数据并渲染到页面

The minute you think of giving up, think of the reason why you held on so long.