SQL query to display a particular content type? I want to create a view which displays a list of a particular content type. I only have access to the database and I need to figure out the list of content type through view; therefore, I am thinking to write SQL for it. Is it possible to do?

I am using Drupal 6.
List all content types

To build a list of all your content types in a Drupal 6 site, use an SQL query like so:

SELECT * FROM `node_type`


The values in the type column in the results you get, corresponds to the machine name for each of the content types you have in your site.

List all nodes of a particular content type

Here is an SQL query to display a list of nodes of content type story in a Drupal 6 site:

SELECT *  FROM `node` WHERE `type` = 'story'


Change story to the machine name of your particular content type (= any of the values in the type column from the first SQL above).