PostgreSQL Create Table With Dynamic Table Name
Fazlı Akça
Posted on November 7, 2023
DO
$$
BEGIN
EXECUTE 'create table zz_find_entity' || TO_CHAR(CURRENT_TIMESTAMP,'YYYYMMDD_HH24MISS') || ' AS select * from find_entity';
END
$$;
💖 💪 🙅 🚩
Fazlı Akça
Posted on November 7, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.