yrstruly Posted September 19, 2019 Share Posted September 19, 2019 I have a table: Named HighScores "INSERT HighScores VALUES ('Bob', 2500, '2 Jan 2013 13:13'), ('Jon', 1500, '2 Jan 2013 13:15'), ('Amy', 3500, '2 Jan 2013 13:18')" I want to create a stored procedure that would: The score must show the TOP 5 or so people. Show your position on the high score board Show the person in front and below you on the high score board. If the scores are tied, the person who got it the most recent is shown higher. Can anybody assist me please? Link to comment Share on other sites More sharing options...
Morshed Chittagong Posted September 25, 2019 Share Posted September 25, 2019 On 9/19/2019 at 3:02 PM, yrstruly said: Show your position on the high score board Show the person in front and below you on the high score board. What do u mean by YOUR in your post? what you need is not clear on the post. pls elaborate. Link to comment Share on other sites More sharing options...
Yurko Posted January 6, 2020 Share Posted January 6, 2020 It doesn't work for MySQL Workbench: CREATE PROCEDURE SelectAllCustomersASSELECT * FROM Customers GO; EXEC SelectAllCustomers; But it is working: DELIMITER // CREATE PROCEDURE SelectCategory()BEGIN SELECT * FROM category;END // CALL SelectCategory(); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now