PostgreSQL
 sql >> Base de Dados >  >> RDS >> PostgreSQL

Como separar texto usando substring

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