PostgreSQL判断一个表是否存在
2012-07-11 11:42
225 查看
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';
方法一:
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判断一个表是否存在
- vc判断文件夹是否存在,及创建一个文件夹
- 判断一个数据是否存在于一个表中,Oracle中写自定义函数
- 判断一个文件夹是否存在
- 判断一个Activity 判断一个包 是否存在于系统中 的方法
- 对于一个整数矩阵,存在一种运算,对矩阵中任意元素加一时,需要其相邻(上下左右)某一个元素也加一, 现给出一正数矩阵,判断其是否能够由一个全零矩阵经过上述运算得到。
- 2.创建一个20个大小的随机数组,然后输入一个数,判断是否存在这个数
- Android 判断SQLite数据库中是否存在某一个表格
- makefile中如何判断一个文件是否存在
- SQLite:在Julia中判断一个表是否存在数据库中?
- OC中关于NSFileManager判断是否存在某一个文件
- C#中怎么判断一个数组中是否存在某个数组值
- js判断一个对象是否存在
- sqlserver中如何判断一个约束是否存在?
- shell:判断一个进程是否存在
- Yii2 如何判断一个路由是否存在
- javascript(jquery)中如何判断一个元素在页面中是否存在
- ios6.1&ios7&ios9判断沙盒文件或者目录是否存在,以及判断是文件还是目录的一个隐藏问题
- 如何判断一个图中是否存在回路