just had a look on there website and it looks like its been going since 1752
so if thats the 2nd oldest - chester had a good monopoly on horse racing for a good 200 years - unless there were other racecourse around back then that no longer exist today ?
Can't recall but it was long before St Andrews, they decamped up the coast to St Andrews, now called the oldest golf club.
"The rules of golf developed in Leith were adopted by the Royal and Ancient Company of Golfers on their move to St. Andrews in 1777" from Wikiwatsit