Thread

  1. SQL script prompting for value

    J.R. Onyschak <jonyschak@nvisia.com> — 2001-05-29T17:17:31Z

    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.