Hi Shuming, > select qty, @[EMAIL PROTECTED] allqty from goods2
That should be @qty1:[EMAIL PROTECTED] You are doing a comparison using =, which is returning false (0). Regards, Jeremy -- Jeremy Cole Technical Yahoo - MySQL (Database) Geek -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]