Re: Psql Question

From: "He Weiping (Laser Henry)" <laser(at)zhengmai(dot)com(dot)cn>
To: Danny <dannyh(at)idx(dot)com(dot)au>
Cc: pgsql-general(at)hub(dot)org
Subject: Re: Psql Question
Date: 2000-09-19 02:23:24
Message-ID: 39C6CE1C.AF5D4BDA@zhengmai.com.cn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Danny wrote:

> - Hello
> - I had previous experience with Access and MySQL.
>
> -Situation
>
> - I am trying to create the equvilant of the following which is a mysql
> command.
>
> - Queston
> - But I cannot figure out how to do this is postgresql
>
> "mysql -u root -p mydb < mydb.dump"
>

I think:
psql -u somebody -d template1 < yourdb.dump
would work.

>
> - I was trying to create a test database using the following commands using a
> very cliche example . This command works on mySQL and should be part of the
> ANSI SQL standard
>
> mydb=# INSERT INTO Customer (Customer_ID,Customer_Name,Customer_Address,Customer_Email)
> mydb-# VALUES ('1','Danny Ho','99 Second Ave, Kingswood','dannyh(at)customer(dot)com'),
> mydb-# ('2','Randal Handel','54 Oxford Road, Cambridge','randalh(at)customer(dot)com')
> mydb-# ;
>

you can't insert two values at the same time, you would have to use two INSERT.

>
> -and I get the following errors :
>
> ERROR: parser: parse error at or near ","
>
> Looking forwrd to your feedback.,
>
> dannyh
>
> dannyH(at)dix(dot)com(dot)au

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Victor Sudakov 2000-09-19 03:38:34 Permissions on databases (not on tables)
Previous Message Tatsuo Ishii 2000-09-19 01:04:55 Re: Can't connect to 6.5.2 server with 7.0.2 client