SQL PowerPoint PPT Presentation

presentation player overlay
1 / 25
About This Presentation
Transcript and Presenter's Notes

Title: SQL


1
SQL
  • Definition Structured Query Language
  • An industry-standard language for creating,
    updating and, querying relational database
    management systems.
  • SQL was developed by IBM in the 1970s for use in
    System R. It is the de facto standard as well as
    being an ISO and ANSI standard. It is often
    embedded in general purpose programming
    languages.

2
(No Transcript)
3
(No Transcript)
4
(No Transcript)
5
(No Transcript)
6
The SELECT statement
  • To use the SELECT command
  • SELECT column, column, .. , column
  • FROM table
  • where column fieldnames. Columns should be
    separated by commas. You may choose to display
    only the columns you wish to see.

7
(No Transcript)
8
Classwork
  • Using the SELECT statement
  • 1. Write a select statement to select only the
    FirstName and LastName of all records in the
    EmployeeAddressTable.
  • 2. Write a select statement to display every
    field from all the records in the
    EmployeeAddressTable.

9
(No Transcript)
10
(No Transcript)
11
WHERE
12
(No Transcript)
13
(No Transcript)
14
The SELECT statement
  • To use the SELECT command
  • SELECT column, column, .. , column
  • FROM table
  • WHERE condition

15
Classwork
  • Using the SELECT statement
  • 3. Write a select statement to every field of
    all records in the EmployeeAddressTable where the
    LastName is Smith.
  • 4. Write a select statement to LastName of all
    the records in the EmployeeAddressTable that live
    in (State) Ohio.

16
AND
17
OR
18
AND/OR
19
AND Before OR
20
Using parenthesis to group conditions
21
Classwork
  • Using the SELECT statement
  • 5. Write a select statement to every field of
    all records in the EmployeeStatisticsTable where
    the Salary is greater than 50000 and Benefits are
    less than or equal to 20000.
  • 6. Write a select statement to LastName of all
    the records in the EmployeeStatisticsTable that
    are Staff and make at least 50000, or are a
    Manager.

22
IN and BETWEEN
23
NOT
24
LIKE
25
Write a Comment
User Comments (0)
About PowerShow.com