Querying Data

Using SQL to query data from your database

Dotted image background


Querying data will eventually be the most common thing you do with your datasquirel account. So it's important to know some essential querying syntax, our node module abstraction will not give you the same level of control as direct sql querying.

SELECT Keyword

SELECT * FROM blog_posts

The select keyword is the most basic and used keyword. In the example above, we're selecting every row(or entry) from the table blog_posts . The "*" sign stands for "all columns". To dial down to specific columns, you can replace the "*" symbol with the column(s) you want to select. Example:

SELECT title, body FROM blog_posts

This query only targets the title and body columns(or fields) in the blog_posts table.