CREATE DATABASE dbname TEMPLATE template0; code example
Example: create database with template
CREATE DATABASE [Database to create]
WITH TEMPLATE [Database to copy]
OWNER [Your username];
CREATE DATABASE [Database to create]
WITH TEMPLATE [Database to copy]
OWNER [Your username];