Is there a difference in the part number for those pieces? The bottom tube of one of the bricks is hollow and the other one isn't. How do I know which version was used when I want to rebuild a set with "original" pieces?

Is there a part number difference?



I also have the same question for plates.
LEGO has changed their moulds, first they added that hole, then they removed it again, and they haven't changed design id, or even (as far as I remember) the element id. Knowing when those changes happened, gives some information (see later).

If you buy bricks on bricklink you can try to ask the seller, but you should be prepared that most sellers will probably answer that the variants are mixed in their stock and that they won't spend time sorting through it to sell you something specific. - I know a guy who was in a similar situation, caring about a(nother) detail that LEGO hadn't changed ids for, who ended up changing the colour of (parts of) his MOC because the period in which the part was made in the "new" colour meant he could be sure that only the good (for his usage) variant had been produced. 

So if you care about that hole I think you're pretty much out of luck, but I believe the same set have been sold with both variants in many cases, in some cases you can probably even find single copies that have contained both variants, so I wouldn't care.