From the course: Introduction to SQLite

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Retrieving data with SELECT

Retrieving data with SELECT - SQLite Tutorial

From the course: Introduction to SQLite

Retrieving data with SELECT

- [Instructor] The SELECT statement lets you retrieve and display rows from a database table. In its simplest form, you would type SELECT star, or asterisk, from table name. This is going to retrieve all the rows and columns from the table you specified. That's a lot of data. You can refine the SELECT statement a bit. For example, if you only want to look at the first 10 rows of a table, you can run the same query, but add LIMIT to it. This will limit it to the first 10 results. Similarly, if you don't want to return all of the columns, you can specify the names of the columns that you do want to see. Here, I'm going to grab Total and BillingCountry from the Invoice table. If you want to do more than just look at the results of a query, you can save the results to a file, such as CSV, or Comma Separated Value, that you could then open in Excel or another program. You can set the mode to CSV with the .mode command.…

Contents