【gp】查表是否存在

【SQL】

一行流方式:

select count(*) from information_schema.table where table_schema='your schema' and table_type='BASE TABLE' and upper(table_name)=upper('your tableName')

层次化方式:

select count(*) 
from information_schema.table 
where 
table_schema='your schema' and 
table_type='BASE TABLE' and 
upper(table_name)=upper('your tableName')

END

posted @ 2022-08-19 05:21  不朽的飞翔  阅读(90)  评论(0编辑  收藏  举报