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


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.


Select all columns from the Author table. It contains the columns:

  • Id – identifies each author.
  • FirstName – the first name of the author.
  • LastName – the last name of the author.
  • Photo – a path to a photo of the author; if there is no author photo, it will store the string N'imgs/no-photo.jpg'.
  • CreateDateTime – when this author registered on the website.
  • IsActive – a boolean value denoting wheter the author has an active account and can write posts (1) or an inactive account (0). Note that the values are displayed as true and false, respectively.