Return to Video

Select Where - Intro to Relational Databases

  • 0:00 - 0:03
    So here's the same
    query you saw earlier.
  • 0:03 - 0:05
    Now let's break it down a little bit.
  • 0:05 - 0:09
    Like we saw before, whenever we want
    to fetch data out of the database,
  • 0:09 - 0:12
    we'll begin our query
    with the keyword select.
  • 0:12 - 0:15
    Then we say, which columns we
    want to see in the result?
  • 0:15 - 0:17
    And then what tables
    they're going to come from?
  • 0:17 - 0:20
    Then we have this where
    thing at the end.
  • 0:20 - 0:25
    That's the restriction, and it says
    what kind of rows we want to see.
  • 0:25 - 0:28
    Here, we only want to see rows
    where the species is gorilla, but
  • 0:28 - 0:31
    what if we want to restrict
    on more than one thing?
  • 0:31 - 0:32
    We can do that.
  • 0:32 - 0:35
    SQL supports the boolean and.
  • 0:35 - 0:37
    Just like python does.
  • 0:37 - 0:41
    If we want to find out the birth date of
    Max the gorilla, we can do it like this.
  • 0:41 - 0:45
    SQL also supports the or and
    not operators, also like in python.
  • 0:45 - 0:49
    So given what we've just seen,
    how might we find the names of
  • 0:49 - 0:53
    all of the animals that are not
    gorillas, and are not named Max?
  • 0:54 - 0:55
    Try that on the next page.
Title:
Select Where - Intro to Relational Databases
Description:

more » « less
Video Language:
English
Team:
Udacity
Project:
ud197 - Intro to RDB
Duration:
0:56
Udacity Robot edited English subtitles for 02-05 Select Where
Udacity Robot edited English subtitles for 02-05 Select Where
Cogi-Admin edited English subtitles for 02-05 Select Where

English subtitles

Revisions Compare revisions