To get a table in drupal 7 same as content_type_[your_field_name] in drupal 6? In the Drupal 6 database, for every content type, there is a  table that's called content_type_[your_field_name] 
Now I have a database query as follows in drupal 6 :


db_query("SELECT n.nid FROM {node} n INNER JOIN {content_type_field_abc} s ON n.vid = s.vid                                                                       
                          INNER JOIN {def_table} sts ON s.nid = sts.nid                                                                                                    
                          WHERE n.type = 'trans' AND s.field_study = '%s' AND sts.status = 1", $account-&gt;name);



Then how can I use db_query in drupal 7 to get a table containing all the fields of the content type as columns same as drupal 6 ?  


Or Simply, how can I write the above given query in drupal 7 ?
That depends what fields you have defined in your content type.

An easier way is to load the node object and fetch your data from it.

$node = node_load($nid);

If you install the Devel module you can do dpm($node); and find how to access all data attached to your node.