Moved SQL-related functions to SQLTable subclass, added a script example.