Intro to SQL
description
Transcript of Intro to SQL
![Page 1: Intro to SQL](https://reader030.fdocuments.net/reader030/viewer/2022020420/568bef8a1a28ab89338c862c/html5/thumbnails/1.jpg)
SQLHttp://iwt.bz
![Page 2: Intro to SQL](https://reader030.fdocuments.net/reader030/viewer/2022020420/568bef8a1a28ab89338c862c/html5/thumbnails/2.jpg)
![Page 3: Intro to SQL](https://reader030.fdocuments.net/reader030/viewer/2022020420/568bef8a1a28ab89338c862c/html5/thumbnails/3.jpg)
Structured
Query
Language
![Page 4: Intro to SQL](https://reader030.fdocuments.net/reader030/viewer/2022020420/568bef8a1a28ab89338c862c/html5/thumbnails/4.jpg)
ID Publication Issue Date
1 XML 2011
2 RelationalAlgebra
2011
Table: ebooks
![Page 5: Intro to SQL](https://reader030.fdocuments.net/reader030/viewer/2022020420/568bef8a1a28ab89338c862c/html5/thumbnails/5.jpg)
SELECTStatements
![Page 6: Intro to SQL](https://reader030.fdocuments.net/reader030/viewer/2022020420/568bef8a1a28ab89338c862c/html5/thumbnails/6.jpg)
SELECT PublicationFROM ebooks
SELECT ID, Publications, Issue DateFROM ebooks
SELECT *FROM ebooks
The asterisk will select all columns.
![Page 7: Intro to SQL](https://reader030.fdocuments.net/reader030/viewer/2022020420/568bef8a1a28ab89338c862c/html5/thumbnails/7.jpg)
WHEREStatements
![Page 8: Intro to SQL](https://reader030.fdocuments.net/reader030/viewer/2022020420/568bef8a1a28ab89338c862c/html5/thumbnails/8.jpg)
Operator Values= Equal
<> Not Equal
> Greater Than
< Less Than
>= Or Equal
<= Less than or equal
BETWEEN Between an Inclusive Value
LIKE Searches for patterns
IN Knowing the exact value you want to get from a
column.
![Page 9: Intro to SQL](https://reader030.fdocuments.net/reader030/viewer/2022020420/568bef8a1a28ab89338c862c/html5/thumbnails/9.jpg)
SELECT PublicationFROM ebooksWHERE Issue Date='2011'
Operator Value
![Page 10: Intro to SQL](https://reader030.fdocuments.net/reader030/viewer/2022020420/568bef8a1a28ab89338c862c/html5/thumbnails/10.jpg)
AND&OROperators
![Page 11: Intro to SQL](https://reader030.fdocuments.net/reader030/viewer/2022020420/568bef8a1a28ab89338c862c/html5/thumbnails/11.jpg)
The AND operator displays a record if both the frst condition and the second condition is true.
![Page 12: Intro to SQL](https://reader030.fdocuments.net/reader030/viewer/2022020420/568bef8a1a28ab89338c862c/html5/thumbnails/12.jpg)
The OR operator displays a record if either the frst condition or the second condition is true.
![Page 13: Intro to SQL](https://reader030.fdocuments.net/reader030/viewer/2022020420/568bef8a1a28ab89338c862c/html5/thumbnails/13.jpg)
SELECT publicationsFROM ebooksWHERE publications='XML'AND date='2011'
![Page 14: Intro to SQL](https://reader030.fdocuments.net/reader030/viewer/2022020420/568bef8a1a28ab89338c862c/html5/thumbnails/14.jpg)
The ORDER BY keyword is used to sort the result set.
![Page 15: Intro to SQL](https://reader030.fdocuments.net/reader030/viewer/2022020420/568bef8a1a28ab89338c862c/html5/thumbnails/15.jpg)
SELECT *FROM ebooksORDER BY dates ASC
![Page 16: Intro to SQL](https://reader030.fdocuments.net/reader030/viewer/2022020420/568bef8a1a28ab89338c862c/html5/thumbnails/16.jpg)
Http://IWT.bz