2017年9月29日

with as 和update ,Delete,insert

摘要: 这个SQL写了很久的时间,感觉pgSQL的很是麻烦。 with as 先命名一个表出来,就可以当成临时表用。 主要是要注意命名,稍不注意,就报错。 在使用using和删除一起用。 和insert一起用。 阅读全文

posted @ 2017-09-29 16:07 手撕高达的村长 阅读(3467) 评论(0) 推荐(0)

postgresql解决锁表

摘要: --查询是否锁表了select oid from pg_class where relname='可能锁表了的表'select pid from pg_locks where relation='上面查出的oid'--如果查询到了结果,表示该表被锁 则需要释放锁定select pg_cancel_b 阅读全文

posted @ 2017-09-29 10:43 手撕高达的村长 阅读(3868) 评论(0) 推荐(0)

导航