Skip site navigation (1) Skip section navigation (2)

Create Database Question

From: "Greg Quinn" <greg(at)officium(dot)co(dot)za>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Create Database Question
Date: 2006-10-27 16:38:24
Message-ID: 001401c6f9e6$528eea90$6501a8c0@melt (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
I am trying to create a database with a table.




create database myNewDb;


CREATE TABLE servers (

    serverid character varying(60) NOT NULL,

    companyid character varying(60) NOT NULL,

    servername character varying(50) NOT NULL,

    companyname character varying(50) NOT NULL



Cool. The problem is, if I run this SQL command, from within another
database instance, it tries to create the table for that database, and not
for the  myNewDb database.

How do I modify the query.


I know SQL Server has something like.


Using [myNewDb]




pgsql-novice by date

Next:From: Shoaib MirDate: 2006-10-27 17:06:36
Subject: Re: Create Database Question
Previous:From: normanDate: 2006-10-27 13:49:30
Subject: Re: Multi table insert

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group