postgresql我沒有搞過。
在mysql中可以select * from tablename;
如果表不存在會返回錯誤。
相信postgresql也是類似的。

解决方案 »

  1.   

    Create table if not exists tablename 如果不存在則創建表Drop table if exists tablename  如果存在則刪除表
      

  2.   

    select * from pg_database where datname="数据库名"; 
     select * from pg_tables where tablename="name_of_table";
    在系统表里查 数据库信息
      

  3.   

    //Create table if not exists tablename 如果不存在則創建表//Drop table if exists tablename 如果存在則刪除表不对啊,不是针对postgresql的吧?