PPA724 queries

Information about PPA724 queries

Published on September 28, 2007

Author: Arley33

Source: authorstream.com

Content

Queries and SQL:  Queries and SQL Professor Jon P. Gant Syracuse University Benefits of a Standardized Relational Language:  Benefits of a Standardized Relational Language Reduced training costs. Productivity. Application portability. Application longevity. Reduced dependence on a single vendor. Cross-system communication. Terminology:  Terminology Data Definition Language (DDL): Commands that define a database, including creating, altering, and dropping tables and establishing constraints. Data Manipulation Language (DML) Commands that maintain and query a database. Data Control Language (DCL) Commands that control a database, including administering privileges and committing data. Slide4:  A simplified schematic of a typical SQL environment, as described by the SQL-92 standard Simple Select:  Simple Select Retrieve the record for Team 20. SELECT * FROM TEAMS WHERE TEAMNUM=20; 20 Yankees New York Simpson Retrieve Table:  Retrieve Table Retrieve the entire Teams table. SELECT * FROM TEAMS; 12 Dodgers Los Angeles Wilson 15 Giants San Francisco Johnson 20 Yankees New York Simpson 24 Tigers Detroit Corbin Simple Project:  Simple Project Find the numbers and names of all of the teams. SELECT TEAMNUM, TEAMNAME FROM TEAMS; 12 Dodgers 15 Giants 20 Yankees 24 Tigers Combination of Conditions:  Combination of Conditions Which players, over 27 years old, have player numbers of at least 1000? SELECT PLAYNUM, PLAYNAME FROM PLAYERS WHERE AGE>27 AND PLAYNUM>=1000; 1131 Johnson 5410 Smith 8366 Gomez ANDs and ORs:  ANDs and ORs Which players are over 30 years old or are less than 22 years old and have a player number less than 2000? SELECT * FROM PLAYERS WHERE AGE>30 OR (AGE<22 AND PLAYNUM<2000); 358 Stevens 21 523 Doe 32 8366 Gomez 33 String Comparison:  String Comparison Which teams are based in Detroit? SELECT TEAMNUM, TEAMNAME FROM TEAMS WHERE TEAMNAME=‘Detroit’; 24 Tigers Between:  Between Which players are between 25 and 27 years old? SELECT PLAYNUM, PLAYNAME FROM PLAYERS WHERE AGE BETWEEN 25 AND 27; 1779 Jones 2007 Dobbs 4280 Cohen 5410 Smith In:  In Which teams are in New York or Detroit? SELECT TEAMNUM FROM TEAMS WHERE TEAMCITY IN (‘New York’, ‘Detroit’); 20 24 Like:  Like Find all of the players whose last names begin with “S”. SELECT PLAYNUM, PLAYNAME FROM PLAYERS WHERE PLAYNAME LIKE ‘S%’; 358 Stevens 5410 Smith 8093 Smith Distinct:  Distinct List the names of the companies that manufacture bats for the league. SELECT DISTINCT MANUF FROM BATS; Acme General United Modern Slide15:  DDL, DML, DCL, and the database development process Slide16:  SQL statement processing order (adapted from van der Lans, p.100)

Related presentations


Other presentations created by Arley33

Cold Weather Safety
02. 01. 2008
0 views

Cold Weather Safety

TEN RULES OF FIREARM SAFETY
26. 02. 2008
0 views

TEN RULES OF FIREARM SAFETY

How to succeed
02. 10. 2007
0 views

How to succeed

The Internet Motion Sensor
07. 10. 2007
0 views

The Internet Motion Sensor

Xraydiffraction 2007
12. 10. 2007
0 views

Xraydiffraction 2007

CHM1222Chromatograph yTheory
16. 10. 2007
0 views

CHM1222Chromatograph yTheory

student chap21
17. 10. 2007
0 views

student chap21

Imperialism and World War I
22. 10. 2007
0 views

Imperialism and World War I

kr spam hacking status
11. 09. 2007
0 views

kr spam hacking status

tiger
11. 09. 2007
0 views

tiger

019
11. 09. 2007
0 views

019

tsg0502 10
09. 10. 2007
0 views

tsg0502 10

atomsmoleculesandions
16. 10. 2007
0 views

atomsmoleculesandions

wipo ip mct 05 3
25. 10. 2007
0 views

wipo ip mct 05 3

Adam Smith Krestinskiy
26. 10. 2007
0 views

Adam Smith Krestinskiy

ROK CP
11. 09. 2007
0 views

ROK CP

R LANQUAR FEMIP
23. 10. 2007
0 views

R LANQUAR FEMIP

rmode potsdam04
15. 11. 2007
0 views

rmode potsdam04

how to spot a turkey
26. 11. 2007
0 views

how to spot a turkey

052407 Gascon
14. 12. 2007
0 views

052407 Gascon

15 whiteCWppt
22. 11. 2007
0 views

15 whiteCWppt

IPv6 Forum World Congress Europe
07. 01. 2008
0 views

IPv6 Forum World Congress Europe

v short lcg
17. 10. 2007
0 views

v short lcg

click construct
02. 11. 2007
0 views

click construct

symp apr 02 page e
15. 10. 2007
0 views

symp apr 02 page e

Model PÃster horitzontal
16. 11. 2007
0 views

Model PÃster horitzontal

NTS 101
16. 02. 2008
0 views

NTS 101

ENG 40B DR Mathias P Point
20. 02. 2008
0 views

ENG 40B DR Mathias P Point

Nichols Schwartz 05 Bowenian
24. 02. 2008
0 views

Nichols Schwartz 05 Bowenian

swartz
17. 10. 2007
0 views

swartz

ON VECTOR 022707 final
19. 10. 2007
0 views

ON VECTOR 022707 final

EducationalPowerpoint
19. 11. 2007
0 views

EducationalPowerpoint

lectures256p3
07. 12. 2007
0 views

lectures256p3

W03 Late Ming 3 Lives b
26. 03. 2008
0 views

W03 Late Ming 3 Lives b

germany 1 27 05
07. 04. 2008
0 views

germany 1 27 05

EH HL3 MP TWG1
30. 03. 2008
0 views

EH HL3 MP TWG1

ustrans
10. 04. 2008
0 views

ustrans

CAP12PP2
13. 04. 2008
0 views

CAP12PP2

Dr Jongkon
14. 04. 2008
0 views

Dr Jongkon

WEBS0104
16. 04. 2008
0 views

WEBS0104

Deb Tairas presentation
17. 04. 2008
0 views

Deb Tairas presentation

silverman 06
19. 02. 2008
0 views

silverman 06

SAB EPEAT 050608
28. 04. 2008
0 views

SAB EPEAT 050608

Macsim Mihai
18. 03. 2008
0 views

Macsim Mihai

martes manyana 5a presentacion
28. 12. 2007
0 views

martes manyana 5a presentacion

korea otonwu06
11. 09. 2007
0 views

korea otonwu06

larsen jsm2003
29. 10. 2007
0 views

larsen jsm2003

PHYCS 199B Oct 29 2002
15. 10. 2007
0 views

PHYCS 199B Oct 29 2002

Ryan Henry
23. 12. 2007
0 views

Ryan Henry

ewilaya eforumALAMI 2007
23. 10. 2007
0 views

ewilaya eforumALAMI 2007

ELAN
05. 10. 2007
0 views

ELAN

BELIZE
22. 10. 2007
0 views

BELIZE

Sheena Kim
11. 09. 2007
0 views

Sheena Kim

moscow11
15. 10. 2007
0 views

moscow11

Gavrilova PAA 2005
12. 10. 2007
0 views

Gavrilova PAA 2005

mirror darts
29. 12. 2007
0 views

mirror darts

bruxelles dd
17. 10. 2007
0 views

bruxelles dd

EC Baron DCC abridged
11. 03. 2008
0 views

EC Baron DCC abridged

Image53967
07. 01. 2008
0 views

Image53967

GSA dlese teaching boxes
30. 10. 2007
0 views

GSA dlese teaching boxes

Illarionovs Projections
26. 10. 2007
0 views

Illarionovs Projections