Convert all records in postgres to Titlecase, first letter uppercase

前端 未结 4 1481
臣服心动
臣服心动 2020-12-15 03:56

I have a simple table in PostgreSQL called keywords with a simple text field called name. I want to convert all names of keywords in first letter uppercase. Is there a way t

4条回答
  •  天涯浪人
    2020-12-15 04:19

    @denis, Gave the Right Answer!

    But in my case I use PgAdmin3 , so after selecting the database there is SQL query Options , So there we can directly add the above query in it.

    I had a table called subcategory_subcategory(name of table) in that i wanted to change a column values whose name was Item_name(name of column ) , so my query was like this

    update subcategory_subcategory
    set Item_name = initcap(Item_name)
    

提交回复
热议问题