O'Reilly logo

CompTIA® Linux+ / LPIC-1 Cert Guide: (Exams LX0-103 & LX0-104/101-400 & 102-400) by Sean Walberg, Ross Brunson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Selecting Data

The SELECT statement is the command you use to extract information from your database. The simplest way to use it is to ask for a single string:

sqlite> SELECT 'Hello, world!';Hello, world!

You can also run expressions:

sqlite> SELECT 1 + 1;2

It would be far more interesting to get information out of a table. This requires the FROM keyword to indicate the name of the table. The FROM clause happens after the SELECT clause.

sqlite> SELECT * FROM book;id          title                                year        author_id----------  -----------------------------------  ----------  ----------1           LPIC 1 Exam Cram 2                   2004        22           Linux and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required