Author Topic: The Use of SQL Commands  (Read 143 times)

0 Members and 1 Guest are viewing this topic.

Offline arpee

  • EquiBerks
  • Jr. Member
  • *
  • Posts: 81
  • Karma: +1/-0
    • View Profile
The Use of SQL Commands
« on: October 01, 2008, 01:56:05 AM »
What do we use SQL commands for?

A common use is to select data from the tables located in a database. Immediately, we see two keywords: we need to SELECT information FROM a table. (Note that a table is a container that resides in the database where the data is stored. For more information about how to manipulate tables, go to the Table Manipulation Section). Hence we have the most basic SQL structure:

Code: [Select]
SELECT "column_name" FROM "table_name"
To illustrate the above example, assume that we have the following table:

Table Store_Information
store_name   Sales        Date
Los Angeles  $1500       Jan-05-1999
San Diego    $250         Jan-07-1999
Los Angeles  $300         Jan-08-1999
Boston         $700        Jan-08-1999

We shall use this table as an example throughout the tutorial (this table will appear in all sections). To select all the stores in this table, we key in,

Code: [Select]
SELECT store_name FROM Store_Information

Los Angeles
San Diego
Los Angeles

Multiple column names can be selected, as well as multiple table names.

Techronnati | where technology never sleeps

The Use of SQL Commands
« on: October 01, 2008, 01:56:05 AM »

Mountain View


Related Topics

  Subject / Started by Replies Last post
0 Replies
Last post October 01, 2008, 02:02:35 AM
by arpee
0 Replies
Last post October 01, 2008, 02:31:56 AM
by arpee
0 Replies
Last post January 06, 2009, 07:12:37 AM
by rpmolecule
1 Replies
Last post July 22, 2016, 03:58:24 AM
by JusticeLeague
0 Replies
Last post August 23, 2017, 10:59:22 AM
by GBTalk

Posting Disclaimer: Any individual may post a message in this forum and may do so anonymously. Therefore, the sole author is exclusively and entirely responsible for all opinions in that message. They do not represent the official opinions of Techronnati, its administrators or moderators or the Techronnati Management. Techronnati is merely acting as an impartial conduit for constitutionally protected free speech and is not responsible and will not be held liable for the content of such messages. All images and service logos are trademarks of their respective owners.