I have this MySQL table:
id | Name |
---|---|
1 | Spanish |
2 | French |
3 | German |
I am using this statement:
SELECT id, Name, Lead(Name) OVER (ORDER BY id) AS 'next' from MyTable WHERE Name='French'
The result is this:
id | Name | next |
---|---|---|
2 | French | (NULL) |
Any help would be appreciated.