nam*_*olk 12 postgresql syntax-error
我需要通过将其与vendorcitycode(由下划线分隔)连接来设置酒店代码,如下所示.
update schema.table_name set
hotelcode = hotelcode+"_"+vendorcitycode)
where vendorid = 'INV27' and vendorcitycode = 'LON'
Run Code Online (Sandbox Code Playgroud)
注意:
hotelcode
并且vendorcitycode
是两列类型character varying(100)
.我使用PostgreSQL 8.0.
Qua*_*noi 20
UPDATE table_name
SET hotelcode = hotelcode || '_' || vendorcitycode
WHERE (vendorid, vendorcitycode) = ('INV27', 'LON')
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
7655 次 |
最近记录: |