postgresql判断表有没有存在的方法-创新互联
创新互联www.cdcxhl.cn八线动态BGP香港云服务器提供商,新人活动买多久送多久,划算不套路!
小编给大家分享一下postgresql判断表有没有存在的方法,希望大家阅读完这篇文章后大所收获,下面让我们一起去探讨吧!
postgresql判断一个表是否存在:
方法一:
select count(*) from pg_class where relname = 'tablename';
方法二:
select count(*) from information_schema.tables where table_schema='public' and table_type='BASE TABLE' and table_name='tablename';
看完了这篇文章,相信你对postgresql判断表有没有存在的方法有了一定的了解,想了解更多相关知识,欢迎关注创新互联-成都网站建设公司行业资讯频道,感谢各位的阅读!
网站题目:postgresql判断表有没有存在的方法-创新互联
URL链接:http://pcwzsj.com/article/djgedc.html