PostgreSQL
 sql >> Database >  >> RDS >> PostgreSQL

Come separare il testo usando la sottostringa

SELECT
  a[2] AS FirstName,
  a[1] AS LastName,
  a[3] AS ID
FROM (
  SELECT regexp_matches(column_name, '(.+), (.+) \((.+)\)')
  FROM table_name
) t(a)