assigning values to user variables in the mysql client

2004-07-27 Thread Boyd E. Hemphill
I would like to do something like this in the mysql client Select CourseId Into @CourseId From Course Where CourseCd='ENGL'; I also tried @CourseId = select CourseId from Course where CourseCd = 'ENGL'; Neither syntax works. So I am wondering if there is a way to assign values using SQL in

Re: assigning values to user variables in the mysql client

2004-07-27 Thread Michael Stassen
You have the wrong syntax. You need SELECT @CourseId:= CourseId FROM Course WHERE CourseId='ENGL'; See the manual http://dev.mysql.com/doc/mysql/en/Variables.html for more. Michael Boyd E. Hemphill wrote: I would like to do something like this in the mysql client Select CourseId Into @CourseId