使用 IF NOT EXISTS 本页为您介绍如何使用使用 IF NOT EXISTS关键字。 带IF NOT EXISTS 关键字作用表示表不存在时才创建。 teledb create table t(id int,mc text); CREATE TABLE teledb create table t(id int,mc text); ERROR: relation "t" already exists teledb create table IF NOT EXISTS t(id int,mc text); NOTICE: relation "t" already exists, skipping CREATE TABLE