get table by id