0

Need to insert Table1 Col1 value into Table2 Col1:

Input:

Table1
Col1
1,2,3,4

Output:

Table2
Col1
1
2
3
4

1 Answer 1

1

Use regexp_split_to_table():

select val
from table1 t1 cross join lateral
     regexp_split_to_table(t1.col1, ',') val;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.