MySQL Forums
Forum List  »  Newbie

Re: How to save a view?
Posted by: Arie Nagel
Date: August 19, 2005 03:05AM

From: http://dev.mysql.com/doc/mysql/en/create-view.html

mysql> CREATE TABLE t (qty INT, price INT);
mysql> INSERT INTO t VALUES(3, 50);
mysql> CREATE VIEW v AS SELECT qty, price, qty*price AS value FROM t;
mysql> SELECT * FROM v;
+------+-------+-------+
| qty | price | value |
+------+-------+-------+
| 3 | 50 | 150 |
+------+-------+-------+

See also: http://dev.mysql.com/doc/mysql/en/views.html

Options: ReplyQuote


Subject
Written By
Posted
August 18, 2005 07:22PM
Re: How to save a view?
August 19, 2005 03:05AM
August 19, 2005 04:03AM
August 19, 2005 04:14AM
August 22, 2005 03:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.