Skip to content

Conversation

@cambyzju
Copy link
Contributor

pick #40715 to branch-2.1

Support `CREATE OR REPLACE VIEW` stmt.

Usage example:
```
mysql>  CREATE VIEW IF NOT EXISTS view_test_create_or_replace_view
    ->         AS SELECT * FROM test_create_or_replace_view_tbl1;
Query OK, 0 rows affected (0.02 sec)

mysql> select * from view_test_create_or_replace_view;
+------+------+------+
| k1   | k2   | v    |
+------+------+------+
|    1 |    1 |    1 |
+------+------+------+
1 row in set (0.03 sec)

mysql>  CREATE OR REPLACE VIEW view_test_create_or_replace_view
    ->         AS SELECT * FROM test_create_or_replace_view_tbl2;
Query OK, 0 rows affected (0.01 sec)

mysql> select * from view_test_create_or_replace_view;
+------+------+------+
| k1   | k2   | v    |
+------+------+------+
|    2 |    2 |    2 |
+------+------+------+
1 row in set (0.03 sec)
```
@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@cambyzju
Copy link
Contributor Author

run buildall

@yiguolei yiguolei merged commit 84f0b1f into apache:branch-2.1 Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants