T
T
Timur_gis_882020-12-19 22:01:15
PostgreSQL
Timur_gis_88, 2020-12-19 22:01:15

How to extract from row by index in sql?

SELECT substring('Guru99' from 1 for 4)
4 characters are extracted from the first position,
but I need characters 1 and 3 to be extracted.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaliy Reusch, 2020-12-19
@Timur_gis_88

substring is not intended for such manipulations. First extract the first character, then the third. You can combine the result together and write it to a variable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question