Extract private method for selecting a table_name