sql server - how to check for user defined tables in postgres? -
apart checking if table exists, how can verify if current user-defined table in postgres
create table if not exists tbl1() how can verify created current user if exists?
try this
select count(*) cnt pg_tables t tableowner=current_user , tablename='tablename' , schemaname='schemaneme' if cnt = 0 (create table tablename)
Comments
Post a Comment