Added SQL support for subdomain tables