It doesn't really help to think that way. The accepted answer to that StackOverflow question sounds very much like the poster didn't really know what Prolog is (and possibly confused it with Datalog).
How would you express the notion of lists in SQL? How would you express the notion of appending two lists? And how would you express the notion of searching for all possible pairs of lists that, when appended, yield the list [a,b,c]?
Here is code to append two lists in Prolog:
You can use this as follows ("?-" is the user input prompt, equations are the system's answers): How would you express the notion of lists in SQL? How would you express the notion of appending two lists? And how would you express the notion of searching for all possible pairs of lists that, when appended, yield the list [a,b,c]?