EXPLAIN EXTENDED

How to create fast database queries

5 Claims About SQL, Explained

with 5 comments

1. Is SQL is a declarative language?

First of all, let's define the terms.

A declarative language describes the result, not the process to achieve it. In a declarative language you tell "what do I need".

A procedural language describes control flow: exact steps the machine needs to perform in order to achieve this result. In a procedural language you tell "what do you do".

SQL, as it was originally designed, is a declarative language.

2980020699_0dfbe889f7_o

For instance you need to know how many customers above 40 live in each city. You issue a query like:

Read the rest of this entry on tech.pro ยป

Written by Quassnoi

October 28th, 2013 at 11:00 pm

Posted in Miscellaneous

5 Responses to '5 Claims About SQL, Explained'

Subscribe to comments with RSS

  1. Tech.Pro site link is not working and couldn’t access the article

    Manoj

    15 Sep 15 at 19:06

  2. @Manoj: seems they’re out of business

    Quassnoi

    15 Sep 15 at 19:12

  3. I thought the whole point of having your own website would be to actually have your own content there :) Maybe you could just update the link to the one from the Internet Archive? I found it: https://web.archive.org/web/20140327174756/http://tech.pro/tutorial/1631/5-claims-about-sql-explained

    Alternatively, just include the actual contents here :)

    Carl-Erik Kopseng

    28 Oct 20 at 13:44

  4. Unfortunately, it’s not my own content, I got paid for writing it and it belongs to whoever was running that site.

    Quassnoi

    28 Oct 20 at 19:23

  5. What a pity, you should know what exactly you are signing under: /

Leave a Reply