Ответ проще некуда:
query = String.Format("declare" +
" a int;" +
" BEGIN" +
" SELECT count(city.city_id) into a FROM city WHERE city.name = '{0}';" +
" if a = 0 THEN" +
" insert into city(CITY_ID, NAME) values(supplier_seq.NEXTVAL, '{0}');" +
" end if;" +
" SELECT city.city_id into a FROM city WHERE city.city_id =(select min(city.city_id) from city where city.name = '{0}');" +
" INSERT INTO FIRM(FIRM_ID, NAME, JUR_CITY_ID) VALUES(supplier_seq.NEXTVAL, '{2}', a);" +
" COMMIT;" +
" end; ", JUR_CITY, POST_CITY, NAME);