SQL script prompting for value

Started by J.R. Onyschakalmost 25 years ago1 messagesgeneral
Jump to latest
#1J.R. Onyschak
jonyschak@nvisia.com

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.