PostgreSQL string character replacement

后端 未结 2 1536
夕颜
夕颜 2021-01-26 03:32

I\'m trying to write a lexical database for storing words comprised of roots and patterns, and I was wondering how I could create a column that will combine the root and pattern

2条回答
  •  闹比i
    闹比i (楼主)
    2021-01-26 04:22

    select
      root,
      root_i,
      translate(root_i, "123", array_to_string(root,'')) as word_i
    NATURAL JOIN tbl_patterns
    NATURAL JOIN tbl_patterns_triliteral
    where root is not null and root_i is not null;
    

提交回复
热议问题