From: Faisal Nasim Date: March 20 1999 6:12pm Subject: MySql - feature missing? List-Archive: http://lists.mysql.com/mysql/699 Message-Id: <000701be72ff$8b19bfa0$860e3ad1@whizpc> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable This is what a book says and MYSQL doesn't support it! =3D-=3D-start ANALYSIS: The output confirms that the original data has not been changed and that = the column heading WHOLESALE+0.15 is not a permanent part of it. In = fact, the column heading is so unattractive that you should do something = about it. Type the following: INPUT/OUTPUT: SQL> SELECT ITEM, WHOLESALE, (WHOLESALE + 0.15) RETAIL FROM PRICE; Here's the result: ITEM WHOLESALE RETAIL -------------- --------- ------ TOMATOES .34 .49 POTATOES .51 .66 BANANAS .67 .82 TURNIPS .45 .60 CHEESE .89 1.04 APPLES .23 .38 6 rows selected. ANALYSIS: This is wonderful! Not only can you create new columns, but you can also = rename them on the fly. You can rename any of the columns using the = syntax column_name alias (note the space between column_name and alias). blah. blah. -------------------------------------------------------------------------= ------- NOTE: Some implementations of SQL use the syntax . The preceding example would be written as follows: SQL> SELECT ITEM =3D PRODUCE, WHOLESALE, WHOLESALE + 0.25 =3D RETAIL, FROM PRICE; Check your implementation for the exact syntax.=20 -------------------------------------------------------------------------= ------- -=3D-=3D-STOP A bug? Shouldn't it be implemented? Both doesn't work on MYSQL. Whats up? =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D Faisal Nasim (the Whiz Kid) Web: http://wss.hypermart.net/ AOL: Whiz Swift ICQ: 4265451 FAX: (815) 846-2877