v.19.5Improvement

Support for CREATE OR REPLACE VIEW

Support for CREATE OR REPLACE VIEW. Allow to create a view or set a new definition in a single statement. #4654 (Boris Granveaud)
Introduces support for CREATE OR REPLACE VIEW statement in ClickHouse, allowing creation or redefinition of a view using a single command.

Why it matters

This feature simplifies view management by enabling users to create a new view or update the definition of an existing view without needing separate drop or alter commands. It streamlines workflows and reduces the risk of errors in view handling.

How to use it

Use the statement CREATE OR REPLACE VIEW view_name AS SELECT ... to create a new view or replace an existing view's definition in one step.