Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
2. The author table
Default values
How to auto-generate values in a database

Instruction

In this part, we'll be working on data from a popular news website. Authors create posts on the website; to do this, they first have to register and supply some information about themselves. This information is stored in the author table.

Let's look at that table.

Exercise

Select all columns from the author table. It contains the following:

  • id – Identifies each author.
  • first_name – The first name of the author.
  • last_name – The last name of the author.
  • photo – The path to a photo of the author; if there is no author photo, it will store the string 'imgs/no-photo.jpg'.
  • create_timestamp – When this author registered on the website.
  • is_active – A boolean value denoting if the author has an active account and can write posts (true) or an inactive account (false).