sqladvanced

String - Technique 15

String manipulation functions

sql
SELECT id,
       trim(name) AS normalized_name,
       regexp_replace(phone, '[^0-9]', '', 'g') AS digits
FROM contacts;

Use Cases

  • database operations
  • data management

Tags

Related Snippets

Similar patterns you can reuse in the same workflow.