SQL - return the connection made