Find the template that is applied to a site collection or a subsite

We can find the template ID that is chosen while creating a site collection or a site from the database.  Its easy to find the template once we have the ID. The ID is stored in the Webs table of the content db.  The ID is just a numberic value like 3, 4, 50 etc. …

0