v.23.2Improvement

Forbid Incorrect CREATE VIEW Syntax

Forbid wrong create View syntax CREATE View X TO Y AS SELECT. Closes #4331. #46043 (flynn).
ClickHouse now forbids the incorrect syntax for creating views using CREATE View X TO Y AS SELECT.

Why it matters

This feature prevents users from mistakenly using an invalid syntax when creating views, ensuring clearer syntax rules and avoiding potential confusion or errors in view creation.

How to use it

Ensure that when creating a view, you use the correct syntax without the TO keyword, for example:

CREATE VIEW view_name AS SELECT ...