Wouter,

set @ID = 173633;
select @Name := Name from MyTable where ID = @ID;
select @Name;

Best regards,
Mikhail.

----- Original Message -----
From: "Wouter van Vliet" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Wouter @ Witbier" <[EMAIL PROTECTED]>
Sent: Friday, August 30, 2002 5:59 PM
Subject: SELECT into :varname


> Heey Folks,
>
> I've been wondering about something for quite a while now.. I know that
it's
> possible in some DBMS's to select a value in some variable, and then in
some
> other query use it again. Is this also possiblein MySQL and if so, how?
>
> Thanks,
> Wouter
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to