3263
MariaDBERRORNotableWindow FunctionsHIGH confidence

Unresolved window name in window function

Production Risk

Low — query is rejected; add the WINDOW definition.

How to reproduce
trigger — this will error
trigger — this will error
SELECT ROW_NUMBER() OVER (w) FROM t1;

expected output

ERROR 3263 (HY000): No window found. An unnamed window cannot be used as a named window.

Fix

Add WINDOW clause

Add WINDOW clause
SELECT ROW_NUMBER() OVER (w) FROM t1 WINDOW w AS (ORDER BY id);

Why this works

The WINDOW clause defines the named window that the function references.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3263 ER_UNRESOLVED_WINDOW_NAME

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MariaDB errors