It's probably a silly question but it is straight forward.
Is it possible to create a view from an existing view?
Let's say I've tableA. I create vwtableA from tableA and now I want to create vvVwtableA from vwtableA.
In pseudo-code it would be something like:
create view vwA as select * from tableA;
create view vwvwA as select * from vwA;
is this possible? I'm trying something like this and I get no MySQL errors executing the statment but I can't browse the second view... MySQL Workbench keeps loading for ever and I don't know if this may be the cause.
My tableA has around 100 000 records, vwA has around 50 000 records and vwvwA should have around 50 000 as well.
Yes, it is possible. See MySQL documentation
The select_statement is a SELECT statement that provides the definition of the view. (When you select from the view, you select in effect using the SELECT statement.) select_statement can select from base tables or other views
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With