SELECT
REGEXP_SUBSTR(your_column, '[^,]+', 1, 1) AS first_element, -- 1番目の要素
REGEXP_SUBSTR(your_column, '[^,]+', 1, 2) AS second_element, -- 2番目の要素
REGEXP_SUBSTR(your_column, '[^,]+', 1, 3) AS third_element -- 3番目の要素
FROM
your_table;
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme