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 logs ( word1 VARCHAR[3], word2 VARCHAR[3] ); INSERT INTO logs (Word1, Word2) VALUES ('{"location","title","value"}', '{"Москва","заголовок1","34"}'), ('{"title","value","location"}', '{"Заголовок999","574584","Тверь"}'); SELECT *, array_position(Word1, 'location') location_position, Word2[array_position(Word1, 'location')] location_value FROM logs;

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

Copy Clear