SQL Tutorial Basics of the SELECT Statement

SQL Tutorial Basics of the SELECT StatementShort Description
SQL Tutorial. Basics of the SELECT Statement. In a relational database, data is stored in tables. An example table would relate Social Security …

Website: myweb.brooklyn.liu.edu | Filesize: 249kb

Content
SQL Tutorial
Basics of the SELECT Statement
In a relational database, data is stored in tables. An example table would relate Social Security
Number, Name, and Address:
EmployeeAddressTable
SSN FirstName LastName Address City State
512687458 Joe Smith 83 First Street Howard Ohio
758420012 Mary Scott 842 Vine Ave. Losantiville Ohio
102254896 Sam Jones 33 Elm St. Paris New York
876512563 Sarah Ackerman 440 U.S. 110 Upton Michigan
Now, let’s say you want to see the address of each employee. Use the SELECT statement, like
so:
SELECT FirstName, LastName, Address, City, State
FROM EmployeeAddressTable;
The following is the results of your query of the database:
First Name Last Name Address City State
Joe Smith 83 First Street Howard Ohio
Mary Scott 842 Vine Ave. Losantiville Ohio
Sam Jones 33 Elm St. Paris New York
Sarah Ackerman 440 U.S. 110 Upton Michigan
To explain what you just did, you asked for the all of data in the EmployeeAddressTable, and
specifically, you asked for the columns called FirstName, LastName, Address, City, and State.
Note that column names and table names do not have spaces…they must be typed as one
word; and that the statement ends with a semicolon (;). The…

Get the file Download here

AddThis Social Bookmark Button
Related Books:
  • 2A An Active X Interactive SQL Tutorial David K. Dennis, Otterbein …
  • Linux Basics Tutorial
  • Linux Basics Tutorial version 3.0
  • Linux Basics Tutorial version 2.0
  • Introduction to Structured Query Language
  • Microsoft Access Tutorial The Basics
  • Linux Basics Tutorial version 1.0
  • Layer Basics

  • Related Searches: , , , ,



    Comments

    Leave a Reply