postgres insert if not exists - not pianika married life

$800.00

INSERT INTO address (house_number, street, city_id) values(11, 'test st', (select id from city where LOWER(city) = LOWER('somecity'))) Is there anyway to insert "somecity" in the city table if "somecity" does not exist in city then after inserting, it would return the ID for the inserted row? . bruno mars if i knew

Add To Cart