Member-only story

Handy string functions: right() and left() with examples in PostgreSQL

Josh Otwell
1 min readApr 10, 2019

--

In this blog post, I will visit a couple of handy string functions for extracting a specified number of characters from a string of text. Yet, with both functions, you can start from a certain position. Either left (beginning) or right (the end). Let’s see them in action with some examples…

OS and DB used:

  • Xubuntu Linux 18.04.2 LTS (Bionic Beaver)
  • PostgreSQL 11.2

Self-Promotion:

If you enjoy the content written here, by all means, share this blog and your favorite post(s) with others who may benefit from or like it as well. Since coffee is my favorite drink, you can even buy me one if you would like!

For these examples, I will use the ‘actor’ table from the mock DVD Rental practice database ported to Postgres, based on the open source SQL Sakila database.

Continue reading the full post here…

Originally published at joshuaotwell.com on April 10, 2019.

--

--

Josh Otwell
Josh Otwell

Written by Josh Otwell

SQL/PHP | Photography | Technical Consultant. Sign-up for my free developer newsletter, OpenLampTech, here: openlamptech.substack.com

No responses yet