From: Penphoe Date: March 12 1999 6:06pm Subject: How do I give a name to a result.... List-Archive: http://lists.mysql.com/mysql/121 Message-Id: <002e01be6cb3$2cac7cc0$020010ac@ns.home.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit I sent this email out a few days ago, and I think it got lost in the email shuffle. Anywayz, if anobody could help me out, it would be much apreciated! LaterZ! Darren!! -----Original Message----- From: Penphoe To: mysql@stripped Date: March 10, 1999 3:26 PM Subject: How do I give a name to a result.... >Is there a way to give the result of a query a temporary name? I was >looking through the docs, and MySQL doesn't support views yet, and its "as" >statement is a little different than what's in my Silberschatz text. > >Here's what I'd like to do: >SELECT first_name, last_name, donation_id FROM >Sponsors LEFT JOIN donations ON >Sponsors.sponsor_id = donations.sponsor_id >ORDER BY last_name, first_name >[as sponsor_donation(first_name, last_name, sponsor_id) #this is what's in >my db text] > >The result of this query, is of course a table with three columns: >first name, last name, and sponsor id. I'd like to store this in a >temporary >table. Is there any way to do this without using an outfile? > >LaterZ! >Darren!! >