Обсуждение: SQL script prompting for value

Поиск
Список
Период
Сортировка

SQL script prompting for value

От
"J.R. Onyschak"
Дата:
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.