我想知道如何分离包含以下内容的列:
BURGER, Petrus (CHV 494081)
分为3栏:
FirstName, LastName, ID
答案 0 :(得分:1)
SELECT
a[2] AS FirstName,
a[1] AS LastName,
a[3] AS ID
FROM (
SELECT regexp_matches(column_name, '(.+), (.+) \((.+)\)')
FROM table_name
) t(a)