Does view take space at disk/file on adding an extra column to view , which is not present in table?

43 Views Asked by At

I want to create a view from a table student and want to add an extra column. does this view take space at disk/file on adding extra column? here is my code:

CREATE OR REPLACE VIEW DETAILS
AS SELECT Name, Serial_number,NULL AS 'additional_field1' from student;
1

There are 1 best solutions below

4
Bill Karwin On

MySQL views never take any space, except for the metadata, that is the definition of the view itself.

They don't store any data, they are more like a macro. When you query the view, it actually runs the query in the view definition.