Drupal 6 Can I use subdomain, for the dev instance of a site and use multiple site configs How do subdomains work in relationship to multiple sites? This seems to be danced around in the documentation that is out there. 

more specifically. If I have...

primarydomain.com  as my site in the site folder.... and point the domain 
dev.primarydomain.com at the drupal install without a dev.primarydomain.com folder will dev load the primarydomain.com or the default site?

The key behind this is I am trying to setup a 3 tier environment for drupal  (dev, test, prod) and want to have as few transformation processes to move things up the tier. So I am hoping I can simply put dev infront of the domain and everything will work.

Also if it does work can I do the same thing on a sub-subdomain? dev.blog.primarydomain.com?

Thank you for your help I am relatively new to drupal and working on putting an existing site into a dev environment to learn more safely.
Short answer is: if example.com exists in the sites folder and a settings.php file is inside it, that file will be selected to serve any request directed to *.example.com.

Long answer is:
let's say an url such as "an.example.com/something" is requested and such request reaches Drupal, here is what happens:


Does a settings file exist in a folder named an.example.com.something (inside the sites/ folder)?
Does a settings file exist in a folder named example.com.something?
Does a settings file exist in a folder named com.something?
Does a settings file exist in a folder named an.example.com?
Does a settings file exist in a folder named example.com?
Does a settings file exist in a folder named com?
Serve the default website.


If at any point of the process the answer to the question is yes, then that file is selected as the settings file.
Of course it will work with more complex subdomains and also more complex paths, as well as port numbers. Have a look at the official Drupal documentation on multi-site and at the conf_path() function for more details.