Ryan Guill wrote: > Sorry for the side topic on this, but I am in mysql setting up a new > database for one of our new projects right now, and now that I am on > mysql 5, I see Views now. I haven't ever used them before. What are > they and what can they do?
A view is sort of like a table, except that is is actually a query. You sometimes use views to simplify complex joins. Like if you commonly join 5 tables, your sql query might get exceptionally complicated. But you could create a view, and query it as if it were one table instead of 5... create view myView as SELECT A.field1, A.field2, B.field3, B.field4 FROM table1 A inner join table2 B on A.id=b.id; select * from myView where field1 = 3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231276 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

