Welcome to the MariaDB monitor. Commands end with ; or \g.
|
Your MariaDB connection id is 9
|
Server version: 10.2.9-MariaDB mariadb.org binary distribution
|
|
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
|
|
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
|
|
MariaDB [anaedv]> USE test;
|
Database changed
|
MariaDB [test]>
|
MariaDB [test]> SET @sql_query = "
|
">
|
"> CREATE OR REPLACE VIEW cte_test AS
|
">
|
"> WITH cte1 AS ( SELECT 1 )
|
">
|
"> , cte2 AS ( SELECT * FROM cte1 )
|
">
|
"> SELECT * FROM cte2;
|
">
|
"> ";
|
Query OK, 0 rows affected (0.00 sec)
|
|
MariaDB [test]>
|
MariaDB [test]> PREPARE stmt FROM @sql_query;
|
ERROR 1146 (42S02): Table 'test.cte1' doesn't exist
|
MariaDB [test]>
|