Selects highest grade using user defined variable
USE university; -- we are looking at the database called: university

SET @grade = (SELECT MAX(points) FROM students);
SELECT @grade AS 'The highest grade'
by Valeri Tandilashvili
4 years ago
MySQL
User defined variables
1
Pro tip: use ```triple backticks around text``` to write in code fences