★ wanayoo — archive 1999 http://wdvl.com/Authoring/DB/Intro/basic_query.htmlNouvelle recherche | Portail wanayoo

Top Ten Internet Stocks logo

internet.com
Join the free
WDVL newsletter!

home

Basics of an SQL Query

August 16, 1998

As we have already alluded to, a "query" is a structured request to the database for data. At its core, a query is something like, "Hey, give me a list of all the clients in the CLIENTS table who live in the 213 area code!"

Or, in more specific terms, a query is a simple statement (like a sentence) which requests data from the database.

Much as is the case with English, an SQL statement is made up of subjects, verbs, clauses, and predicates.

Let's take a look at the statement made above. In this case, the subject is "hey you database thing". The verb is "give me a list". The clause is "from the CLIENTS table". Finally, the predicate is "who live in the 213 area code."

We'll explain the code later, but let me show you what the above statement might look like in SQL:

SELECT * FROM CLIENTS WHERE area_code = 213

SELECT = VERB = give me a list
FROM CLIENTS = CLAUSE = from the CLIENTS table
area_code = 213 = PREDICATE = who live in the 213 area code

Views
Introduction to Databases for the Web | Table of Contents
Data Types

Up to => Home / Authoring / DB / Intro

Instantly look up a "techie" word using Webopedia!!


internet.com
e-commerce
WebDeveloper Network


Grow your revenue stream!

Copyright 1999 internet.com Corporation. Legal Notices. Privacy Policy.

www.internet.com