© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
M. SimonGetting Started with SQL and Databaseshttps://doi.org/10.1007/978-1-4842-9493-2_5

5. Calculating Column Values

Mark Simon1  
(1)
Ivanhoe VIC, VIC, Australia
 

To this point, you’ve been working mostly with straightforward data values from the tables. However, you can also recalculate values to give you a form that’s more suitable to a particular situation.

There are a number of interrelated principles involving the type of values you keep in SQL table columns:
  • Values should never be repeated.

    This includes variations of the same value, such as the height in centimeters and the height in inches or the date of birth and the age.

  • All columns should be independent ...

Get Getting Started with SQL and Databases: Managing and Manipulating Data with SQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.