Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

PGSQL dynamic table name

EXECUTE format('SELECT count(*) FROM %I '
   'WHERE inserted_by = $1 AND inserted <= $2', tabname)
   INTO c
   USING checked_user, checked_date;
Source by www.postgresql.org #
 
PREVIOUS NEXT
Tagged: #PGSQL #dynamic #table
ADD COMMENT
Topic
Name
4+3 =