我需要按照以下方式通过将hotelcode与vendorcitycode(由下划线分隔)连接来设置hotelcode。
update schema.table_name set
hotelcode = hotelcode+"_"+vendorcitycode)
where vendorid = 'INV27' and vendorcitycode = 'LON'
注意: hotelcode
和vendorcitycode
是两个类型为character varying(100)
的列。我使用的是PostgreSQL 8.0。