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

Popular posts from this blog

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -