Quantcast
Channel: MySQL Forums - Microsoft SQL Server
Viewing all articles
Browse latest Browse all 686

convert ms sql to my sql (1 reply)

$
0
0
dont know much about my sql but why wont this work. ??

DECLARE fetch_status, id ,ordernum INT
set ordernum = 1
DECLARE Prs_Cursor Cursor FOR SELECT id FROM lawyers order by ordernum
Open prs_cursor
FETCH NEXT FROM Prs_Cursor INTO @id
WHILE FETCH_STATUS = 0 do
update lawyers set ordernum = @ordernum
set @ordernum = @ordernum + 1
FETCH NEXT FROM Prs_Cursor INTO @id
end
Close prs_cursor;

Viewing all articles
Browse latest Browse all 686

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>