2017-05-03 94 views

回答

3

使用split_part(),例如:

with my_data(col) as (
values 
    ('abcde?dafsdfdsfsd'), 
    ('absdfcde?dafsdfdsfsdsfdsdfd') 
) 

select split_part(col, '?', 1) 
from my_data; 

split_part 
------------ 
abcde 
absdfcde 
(2 rows)  
相關問題