0% found this document useful (0 votes)
2 views

Lesson 1 - SQL Fundamentals (SELECT, WHERE)

The document provides an overview of Structured Query Language (SQL) and its syntax for querying structured data stored in tables. It explains the use of the SELECT statement to retrieve specific columns and rows from a database, including the use of DISTINCT to filter unique results. Additionally, it covers the LIMIT clause to restrict the number of returned rows and mentions that SQL is not case-sensitive.

Uploaded by

plaatjies.ipele
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lesson 1 - SQL Fundamentals (SELECT, WHERE)

The document provides an overview of Structured Query Language (SQL) and its syntax for querying structured data stored in tables. It explains the use of the SELECT statement to retrieve specific columns and rows from a database, including the use of DISTINCT to filter unique results. Additionally, it covers the LIMIT clause to restrict the number of returned rows and mentions that SQL is not case-sensitive.

Uploaded by

plaatjies.ipele
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Structured

Query Languagea

(L san

Structured Data
stored in tables

ItallowsyootableColumns
*

SELECT FROM table- name


;
L It
columns

Allows
·
allows to

from your
to
choose

select
specific
table

all the
rows
you
and columns

In the SELECT statement


you
the columns
can
specify the
want
of
that
you
dentdental
#
ofEvery
names
SELECT - column
StudentID
,

Name that
FROM Students ; in you
the
specing
SELEC

ident m
statement
Statement will

b
SQL
Syntax
:

*
① SELECT FROM table -
name ;
& Returns and all the
all the rows
columns
automatically

② SELECT column) ,
Columna,
column 3

FROM table-name ;

& Returns the


specificied columns
in the SELECT statement
SELECT DISTINCT column colume, colum,
,

2
FROM table -
name

ISTINCT

#
Customers means

want to
see different

-
que
I
SELECT DISTINCT
a
city

FROM customers
j

Here
#
~
It will return the
SELECT column column names
, specified
columna , but it will limit the
Column 3 output to
only two
rows .
FROM table -
name

Affectsthere
LIMIT 2 ;

=
SELECT

OCustomerName

city
,

Affects
rows the
Comparison Operators

= Greater than or
Equal to
filtering
data
#SELECT
customer Name,
City
FROM customers

WHERE =Soweto)
city ;

#Name
City
t -
SQL is not case sensative

You might also like