Re: batch file

Поиск
Список
Период
Сортировка
От Jie Liang
Тема Re: batch file
Дата
Msg-id Pine.BSF.4.10.10105251059040.61843-100000@tidal.ipinc.com
обсуждение исходный текст
Ответ на batch file  (Milen <milend@ansco.com>)
Список pgsql-sql
Hi,

I am not sure what's your question.
However, you can list a bunch of SQL statements in a text file:
e.g.
myfile.sql which contains:

select * from tablename where ....
update tablename set ... where ...
.....

then, you can just run it like:


psql -q dbname < myfile.sql




Jie LIANG

St. Bernard Software

10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873

jliang@ipinc.com
www.stbernard.com
www.ipinc.com

On Fri, 25 May 2001, Milen wrote:

> Hi all!,
> 
> I want to execute several SQL statements one after another.
> Does anyone know if it is possible to create something like a "batch file" 
> which contains all SQL commands I want.
> 
> Best Regards:
> Milen
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
> http://www.postgresql.org/users-lounge/docs/faq.html
> 



В списке pgsql-sql по дате отправления:

Предыдущее
От: Jason Earl
Дата:
Сообщение: Re: batch file
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: batch file