Technically, Nellie Oleson was married twice on the show.
The first time Nellie was married, was to Luke Simms, someone she eloped with during one of the early seasons of the show. While it’s not exactly stated how their marriage is ended, it is presumed that the marriage is annulled because they were married without their parents’ permission and being too young, when their parents march them back to the justice of the peace.
Later in the series, Nellie Oleson’s parents surprise her with the restaurant as a gift for finishing school. Caroline Ingalls ends up working there as a waitress and cook, however, it is clear to Nellie’s parents that Nellie needs to learn more about the restaurant business. And in order to do this, Nellie’s parents bring in Percival Dalton to teach her everything she needs to know about running a restaurant in the episode He Loves Me, He Loves Me Not (Part One).
When they first meet, Nellie and Percival do not get along, as Nelly is acting in her usual haughty and arrogant ways. But eventually, Percival begins to see a softer side of Nellie that most people aren’t aware of, and they eventually fall in love in the second half of the He Loves Me, He Loves Me Not two part episode.
Nellie and Percival do get married on the show, and they later have twins.