From the course: Learning SQL Programming

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Ask for data with SELECT

Ask for data with SELECT - SQL Tutorial

From the course: Learning SQL Programming

Start my 1-month free trial

Ask for data with SELECT

- [Instructor] The most basic way of asking for information with SQL is to use a select statement. Select statements start with the select keyword, which tells the database software that we want it to select, or choose, or collect specific information from the database and return it to us. In fact, we can use it to return information that isn't even part of the database. For example, if I wanted the database software to send me back some text, I could write select and put hello world or any other texts inside single quotes and end that with a semi-colon and I would get that text back regardless of the data stored in the database. Try it out for yourself. Anything you put in single quotes will get returned to you as text. Returning explicit text can be useful for some queries but we won't focus on it here. Instead, we can replace that statement in single quotes with some parameters that will tell the database software to start sending us information from the database. First, let's take…

Contents