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
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