Updated on 2025-06-07 GMT+08:00

U0400044: GaussDB (M-compatible mode) does not support WINDOW in SELECT

Description

Database Type and Version

  • Source database type and version: MySQL 5.5, 5.6, 5.7, and 8.0
  • Target database type and version: GaussDB (M-compatible mode)

Syntax Example

The WINDOW clause of MySQL can define and name a window. In an OVER clause, the window name is used for reference. This error is reported because GaussDB (M-compatible mode) does not support this syntax, for example:

SELECT * FROM
(
SELECT *,row_number() OVER w AS row_num
FROM order_tab
WINDOW w AS (PARTITION BY product_id ORDER BY amount DESC)
)t ;

Suggestion

No solution is available. You are advised to refactor application code.