Placeholder Image

Subtitles section Play video

  • Hey there, future data wizards!

  • Let's look at the SELECT statement.

  • Think of it as your trusty tool for picking data out of a database, like choosing your favorite candies from a jar. So let's get started.

  • The SELECT statement is used to grab data from a database.

  • Here's a simple example to warm up.

  • This code tells the database, "Hey, give me the customer name and city columns from the customers table." But how do we write this in a general form?

  • Here's the syntax.

  • Column 1, column 2, etc. are the columns you want, and table name is the table you're getting them from. Now let's look at our demo database, the customers table.

  • Here's a sneak peek.

  • Let's do our SELECT statement from earlier: "SELECT customer name and city from customers." Pretty cool, right? But what if we want to see everything in the table?

  • We use the star wildcard, like this.

  • This tells the database, "Show me all the columns," and you get the whole shebang! And that's the basics of the SQL SELECT statement.

  • Easy peasy, right?

  • Thanks for watching!

  • Like and subscribe to get notified about our latest videos.

  • For more coding tips and tricks, keep it locked right here on w3schools.com.

  • Don't forget to try out what you've learned in our interactive editor.

  • Happy coding!

Hey there, future data wizards!

Subtitles and vocabulary

Click the word to look it up Click the word to find further inforamtion about it

B1 US

SQL - SELECT Statement - W3Schools.com

  • 7 0
    Su Wei posted on 2024/11/19
Video vocabulary