Tuesday, 15 January 2013

How to reference a just created column in mysql view? -



How to reference a just created column in mysql view? -

i need create mysql view this:

the sec column calculate first view column. how can reference first column name define sec one?

create view v_data select ..... 'first_view_column', (here can reference 'first_view_column' straight , how ?)*20 'second_view_column' tb;

thanks!

you utilize regular select syntax:

create view v_data select col1, (col1*20) col2 tb;

mysql view reference

No comments:

Post a Comment