Question: I am developing MVC application.
I am trying to build the project by model first technique. 
I have created the three class.

1. Company - Base/Parent class.
2. Customer - Child class inherited from Company class.
3. Party class - Child class inherited from Company class.

now while generating the DB , it creates three separate tables , which I dont want. 
I want to create the single table for these entities. 

I think VS 2012 dont support TPH. 

What to do ?

Answer: 
I think you need an `INNER JOIN` rather than a `LEFT JOIN` query

```
SELECT *, `users`.`id` as user_id 
FROM (`users`) 
INNER JOIN `user_profile` 
ON `user_profile`.`user_id` = `users`.`id` 
INNER JOIN `user_image_profile` 
ON `user_image_profile`.`user_id` = `users`.`id` 
ORDER BY  `users`.`created` desc LIMIT 12 

```
Add in query

```
GROUP BY `users`.`id`

```