I'm having problems with the following:
I've only ever worked with SQL Server in the past and I just can't seem to get my head around MySQL stored procs. I get an syntax error (select' at line 2). Can anyone point me in the right direction?
Thanks
Nick
Code:
create procedure UpdateOrder (
@PID as int,
@COrder as int,
@NOrder as int)
begin
declare OID int
select ID into OID from Playlist where Order_ID = @NOrder
update Playlist
set Order_ID = @NOrder
where ID = @PID
update Playlist
set Order_ID = @COrder
where ID = OID
end;
I've only ever worked with SQL Server in the past and I just can't seem to get my head around MySQL stored procs. I get an syntax error (select' at line 2). Can anyone point me in the right direction?
Thanks
Nick