PostgreSQL substring get string between brackets

后端 未结 2 1268
北恋
北恋 2021-01-17 12:12

I have a string, say:

Product Description [White]

I want to extract anything inside the brackets (in this case White) from that str

2条回答
  •  [愿得一人]
    2021-01-17 12:40

    i think you want to update some value like grade pay from pay scale or any thing just use following query

    UPDATE master.pay_scale SET grade_pay= Case When description LIKE '%(%)%' Then (select substring(description from '((.+))')) else description End::numeric

提交回复
热议问题