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

Re: Create Database Question

From: "Shoaib Mir" <shoaibmir(at)gmail(dot)com>
To: "Greg Quinn" <greg(at)officium(dot)co(dot)za>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Create Database Question
Date: 2006-10-27 17:06:36
Message-ID: bf54be870610271006i37e624b4x775aebdef9133de0@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
After create database add something like:

\c myNewDb

Thanks,
--------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)

On 10/27/06, Greg Quinn <greg(at)officium(dot)co(dot)za> wrote:
>
>  I am trying to create a database with a table…
>
>
>
> i.e
>
>
>
> 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
>
> ) WITHOUT OIDS;
>
>
>
> 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]
>
>
>
> CREATE TABLE …
>

In response to

pgsql-novice by date

Next:From: normanDate: 2006-10-27 17:10:23
Subject: Re: Create Database Question
Previous:From: Greg QuinnDate: 2006-10-27 16:38:24
Subject: Create Database Question

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