In the first sentence, Tisch is in the nominative case since Tisch is the subject of the sentence. In the second, Tisch is in the accusative case because it is an object and not the subject. Since Tisch is a masculine noun, it is ein Tisch in the nominative case. In the accusative case, ein changes to einen for masculine nouns. Just something to remember, and should be in the lesson Tips.