Your First SQL Statement (2024)

To recap, SQL or Structured Query Language 0:00

is a specialized language to getinformation or data out of a database. 0:04

There are many differentdatabase systems such as MySQL, 0:09

Microsoft SQL Server, Oracle,PostgreSQL, and SQLite. 0:13

All of them use the same language, SQL. 0:18

Just like spoken languages, programminglanguages have their own vocabulary and 0:21

grammatical structure. 0:25

Programmers refer to this vocabulary andgrammar as syntax. 0:27

Thankfully, most programming languageshave a much smaller vocabulary 0:30

than spoken languages. 0:34

Though they are few, 0:36

the vocabulary words in programminglanguages are very important. 0:37

And we call them key words. 0:41

[SOUND] A keyword is a command that youissue to a computer to do a certain thing. 0:42

And SQL has its own sets of keywords. 0:48

Lines of SQL code are knownas a Statement or a Query. 0:51

A statement in SQL is likea sentence in English. 0:56

A query in SQL is like askinga question in English. 0:59

Most queries, no matter how complex,are issued to the database one at a time. 1:03

You may hear the issuing of a statementbeing referred to as running a query, or 1:09

executing the SQL. 1:14

Let's take a look at a common SQL query. 1:16

We'll retrieve all information fromthe table with the data about books. 1:19

Remember, a table is one ofthe spreadsheet like structures 1:24

inside a database made up of rows andcolumns. 1:27

Let's see how we might writea query in English first. 1:31

[SOUND] What is all the information wehave about each book in the books table? 1:36

Now, let's see the SQL syntax tobring back all the information from 1:41

the books table. 1:44

See those upper case words there,SELECT and FROM? 1:45

They are key words or special wordsreserved for the SQL programming language. 1:48

You issue a select command whenyou want to write a query. 1:54

You're asking the database to select or 1:58

retrieve some of the informationfrom a particular table. 2:00

In this case, it's books. 2:04

The asterisk, or the star character,means you want to bring 2:06

all of the information in allof the tables' columns back. 2:09

I'll show you how to bring backspecific columns of information later. 2:13

The semicolon at the end ofthe query is like a period or 2:17

a question mark at the endof a sentence or question. 2:21

The semicolon lets the database knowwhere the statement ends or terminates. 2:24

When we issue the statementto the database, 2:29

you can expect all entries inthe books table to be returned. 2:31

Let's see the results of thisquery in the SQL playground and 2:35

see this query in action. 2:39

As you can see, it brings back allinformation in the books table. 2:42

Let's ask another question. 2:46

Who are all the users ofthe library in the patrons table? 2:48

We'd use the SELECT keyword, 2:52

star, meaning all of the columns, 2:55

FROM, and then the table name. 2:58

In this case, the table name is patrons. 3:00

Don't forget the semicolonto terminate the statement. 3:04

Once we execute this query,it will return all patron information. 3:07

So generally speaking,writing SELECT * FROM <table name>; 3:12

is a query we can use toretrieve all data from any table. 3:17

This can be useful for small data sets. 3:22

When you have larger data sets likethe users of a large social network, or 3:25

the orders from a popular e-commerce site,you probably don't want to run queries 3:30

like this because it can take a very longtime to execute and return the results. 3:35

This can slow the performance down forother database users too. 3:40

However, the data sets in thiscourse are very small, and 3:44

running these types of queries won'thave any real performance impact. 3:48

Databases have more utility than reportingall the information in one table. 3:52

In the next video, I'll show youhow to bring back specific columns. 3:57

Your First SQL Statement (2024)
Top Articles
REITs vs. ETFs: Which Are Better for Retirees?
Intellectual Disability: Definition, Symptoms, & Treatment
Stretchmark Camouflage Highland Park
Gabrielle Abbate Obituary
Farmers Branch Isd Calendar
Craigslist In Fredericksburg
GAY (and stinky) DOGS [scat] by Entomb
Buckaroo Blog
Slay The Spire Red Mask
Was sind ACH-Routingnummern? | Stripe
World Cup Soccer Wiki
Lqse-2Hdc-D
2135 Royalton Road Columbia Station Oh 44028
Slag bij Plataeae tussen de Grieken en de Perzen
Mlb Ballpark Pal
Alejos Hut Henderson Tx
Jesus Calling Oct 27
Finger Lakes Ny Craigslist
Pizza Hut In Dinuba
Bing Chilling Words Romanized
Rural King Credit Card Minimum Credit Score
Military life insurance and survivor benefits | USAGov
Dtlr Duke St
Pocono Recird Obits
How to Watch Every NFL Football Game on a Streaming Service
European Wax Center Toms River Reviews
Arrest Gif
Kirk Franklin Mother Debra Jones Age
How Do Netspend Cards Work?
UPS Drop Off Location Finder
Www Craigslist Com Shreveport Louisiana
Roto-Rooter Plumbing and Drain Service hiring General Manager in Cincinnati Metropolitan Area | LinkedIn
Royals op zondag - "Een advertentie voor Center Parcs" of wat moeten we denken van de laatste video van prinses Kate?
The 38 Best Restaurants in Montreal
Greater Keene Men's Softball
Empire Visionworks The Crossings Clifton Park Photos
Frcp 47
Troy Gamefarm Prices
Latest Nigerian Music (Next 2020)
Culver's of Whitewater, WI - W Main St
Blackwolf Run Pro Shop
Tryst Houston Tx
Ucsc Sip 2023 College Confidential
Kent And Pelczar Obituaries
Mathews Vertix Mod Chart
John M. Oakey & Son Funeral Home And Crematory Obituaries
Yale College Confidential 2027
Every Type of Sentinel in the Marvel Universe
Wrentham Outlets Hours Sunday
Jasgotgass2
Thrift Stores In Burlingame Ca
Latest Posts
Article information

Author: Arielle Torp

Last Updated:

Views: 5925

Rating: 4 / 5 (61 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Arielle Torp

Birthday: 1997-09-20

Address: 87313 Erdman Vista, North Dustinborough, WA 37563

Phone: +97216742823598

Job: Central Technology Officer

Hobby: Taekwondo, Macrame, Foreign language learning, Kite flying, Cooking, Skiing, Computer programming

Introduction: My name is Arielle Torp, I am a comfortable, kind, zealous, lovely, jolly, colorful, adventurous person who loves writing and wants to share my knowledge and understanding with you.