The victory means the Borderers completed the double over the side from Yorkshire in Pool Eight, but will not be progressing to the quarter-finals.
Melrose led 6-5 at the break after two penalties by Andrew Skeen were countered by Brian McGovern's unconverted try.
After the interval Callum Anderson scored his first try since returning to Melrose from Aberdeen Grammar, while Jamie Murray also touched down. Joe Helps kicked a penalty, and Skeen converted a single try. Tom Francis and Scot Dougie Flockhart scored tries for the Knights, Jamie Lennard converting one, but Melrose held on.
In Pool Three Dundee HSFP battled to get their pitch playable, then competed well against Swansea, but the Welsh came out 11-5 victors at Mayfield, which left the Scots having won one and lost five in their first foray in the cross-border event.
All the points yesterday came in the first half – Richie McIver bagging a try for the home side, but Swansea won out through a try from Scott Otten and two penalties from Nicky Thomas.
At the Athletic Ground in Richmond London Scottish got revenge on Gala for their defeat at Netherdale in October with a comprehensive 32-0 victory.
In the Pool Six clash James Love gave Scottish an early 3-0 lead with a penalty before Andy McLean of Gala missed a chance to level.
Tries then came from Scottish captain Mark Bright and Jamie Stevenson, as well as a conversion from Love, as the hosts went 15-0 up. Stevenson scored his second just before the break after a great crossfield kick from Phil Godman and they turned around 22-0 to the good.
In the second 40 minutes Love scored his side's fourth try and Stevenson completed his hat-trick to round off the home win.
In Pool Two Stirling County went down 35-22 at Neath. Having not arrived in Wales until 3am yesterday morning due to travel problems, County could have been bleary eyed, but gave as good as they got until Alex Black's sending-off in the 41st minute. Stirling's tries came from captain Alex Moffat, Jon Welsh and Steve Swindall.