Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
create table test ( col varchar(64) ); insert into test values ('ЧС.1.1'), ('ЧС.1.2'), ('ЧС.1.3.1'), ('ЧС.1.10'), ('ЧС.1.11.1'), ('П.1.1'), ('П.1.2'), ('П.10.2'), ('П.2.10'); select col from test order by (string_to_array(col, '.'))[1], (string_to_array(col, '.'))[2]::int, (string_to_array(col, '.'))[3]::int;

Stuck with a problem? Got Error? Ask AI support!

Copy Clear