alldp charcter varraying
"K409,K358,K353,L059,R100,L050,K610,K352,K429,C181,D129,K565,T8558,K560,K402,A045,K661,I841,I848,Z433"
I can count them. here is 20.
But if I want to write a statement in Postgres to get 20, how should I do?
alldp charcter varraying
"K409,K358,K353,L059,R100,L050,K610,K352,K429,C181,D129,K565,T8558,K560,K402,A045,K661,I841,I848,Z433"
I can count them. here is 20.
But if I want to write a statement in Postgres to get 20, how should I do?
You can split the string into an array and then count the elements in the resulting array:
But you should really consider fixing your data model. Storing comma separated values in a column is almost always a bad idea.