Skip to content

Coder Tutorial

Menu
  • Home
  • HTML
  • CSS
  • PHP
  • SQL
  • MySQL
  • JS
  • PL/SQL
  • Python
  • Java
  • Oracle
Home
PostgreSQL
PostgreSQL ERROR: negative substring length not allowed

PostgreSQL ERROR: negative substring length not allowed

PostgreSQL negative substring length not allowed

Wrong select

select substring('abc', 1,-1);

ERROR: negative substring length not allowed

Correct select

select substring('abc', 1, 1);

Data Output: a

select substring('abc', 1, 2);

Data Output: ab

Tutorials

  • PostgreSQL Tutorial
  • PostgreSQL Create Table
  • PostgreSQL Drop Table
  • PostgreSQL Select
  • PostgreSQL Insert
  • PostgreSQL Update
  • PostgreSQL Delete
  • PostgreSQL Distinct
  • PostgreSQL Where
  • PostgreSQL And – Or
  • PostgreSQL Between
  • PostgreSQL Like
  • PostgreSQL Order By
  • PostgreSQL Group By
  • PostgreSQL Having
  • PostgreSQL Count
  • PostgreSQL AVG
  • PostgreSQL MAX
  • PostgreSQL MIN
  • PostgreSQL SUM
  • PostgreSQL View
  • PostgreSQL Create Function
  • PostgreSQL Create Trigger

Recent Posts

  • Java Polymorphism
  • Java Encapsulation
  • Java Abstraction
  • PostgreSQL ERROR: cannot begin/end transactions in PL/pgSQL
  • PostgreSQL Column must appear in the GROUP BY clause
  • PostgreSQL Column specified more than once
  • PostgreSQL Create database, Alter database examples
  • PostgreSQL Create schema syntax, Alter schema
  • PostgreSQL Create database user, alter and drop username
  • PostgreSQL Alter table name. Modify column name
Coder Tutorial Copyright © 2025. | Privacy Policy
Back to Top ↑
x