How do I create a view in MySQL?
Asked
Active
Viewed 4.7k times
37
-
11Do you have any problem with the manual? http://dev.mysql.com/doc/refman/5.0/en/create-view.html – Nicola Cossu Mar 03 '11 at 20:08
-
2@@nick rulez: I always trust stackoverflow for different types of suggestions and answers. that's y i posted here. – Fero Mar 05 '11 at 06:48
-
2Thanks for the compliment. However, we'd rather you try to figure it out first. – mellamokb Mar 05 '11 at 13:01
-
@@mella: Thanks for your advice mella. Hereafter i will do the same and if i didn't get my exact answer i will come here... :-) – Fero Mar 07 '11 at 04:40
-
http://bindasmonkeys.com/views-mysql-create/ – Mar 18 '16 at 07:15
-
mellamokb its better to just get simple answers from all these stack overflow experts than hunt for answers from all over the web. – webs Jan 03 '18 at 16:18
2 Answers
56
http://dev.mysql.com/doc/refman/5.5/en/create-view.html
Example:
Create View `MyViewName` as
Select
col1, col2, col3
From
myTable T

mellamokb
- 56,094
- 12
- 110
- 136