SQL script prompting for value

From: "J(dot)R(dot) Onyschak" <jonyschak(at)nvisia(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: SQL script prompting for value
Date: 2001-05-29 17:17:31
Message-ID: 3B13D9AB.50003@nvisia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I would like to have a sql script prompt the user for a value to use for
the rest of the script. In oracle I would do:

accept city_key prompt 'Enter city key (ex: IL-CITY):'

INSERT INTO city_info (muni_id, contact_first_name, contact_last_name)
VALUES ('&city_key','','');

Is anything like this possible using psql?

Thanks,
J.R.

Browse pgsql-general by date

  From Date Subject
Next Message Arcady Genkin 2001-05-29 17:29:29 Changing path to /tmp/.s.PGSQL.5432 file and the .lock file
Previous Message Tim Barnard 2001-05-29 17:14:20 Re: Help with C++