postgres create database if not exists

Solutions on MaxInterview for postgres create database if not exists by the best coders in the world

showing results for - "postgres create database if not exists"
David
13 May 2020
1SELECT 'CREATE DATABASE mydb'
2WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'mydb')\gexec