Code selects and prints the records in the table