SQL Tutorial for Data Analysis 5: Arithmetic Operations

Pubblicato il: 06 settembre 2020
sul canale di: Ram Kedem
1,537
9

In this SQL Tutorial we're going to learn how to use Arithmetic operations. Arithmetic operations are simply mathematical calculations such as subtraction, addition, or division.

Key Concepts to remember -
On numerical columns it is permitted to perform any mathematical calculation
It is not possible to perform any arithmetic operations on a string datatype
On dates - multiplication or division are not possible. Addition and subtraction adds or subtract days.
Any calculation on a NULL returns NULL.
Calculations do not change the actual data, they only change the way values of columns are displayed.
Different calculations set the column’s header to (No Column Name) We’ll address this issue in our next video

Course Examples -
https://ramkedem.com/en/sql-basics-ex...

ACDB Database -
https://ramkedem.com/en/acdb-sample-d...

Written SQL tutorials including exercises -
http://ramkedem.com/en/sql-server/

About Myself -
https://ramkedem.com/en/about/

My Linkedin Page -
  / ram-kedem-a5b4b33b  

My Facebook Page -
  / ramkedemfeed  

SQL Platform Differences (comparing MySQL & Oracle)

MySQL -
Arithmetic operations over strings - MySQL treats the string as 0. So for example: 'Hello' + 5 would yield 5, 'Hello'*5 would yield: 0
MySQL Arithmetic operations over dates - Every calculation on a date value converts the date into a number, and perform the calculation over the number. so for example: 2006-08-23 00:00:00.000000 + 1 would yield: 20060823000001.000000
Different calculations set the column’s header to the new calculation, so for example, the expression: join_date + 5, sets the column's header to join_date + 5

Oracle -
Different calculations set the column’s header to the new calculation, so for example, the expression: join_date + 5, sets the column's header to join_date + 5


In questa pagina del sito puoi guardare il video online SQL Tutorial for Data Analysis 5: Arithmetic Operations della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Ram Kedem 06 settembre 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 1,537 volte e gli è piaciuto 9 spettatori. Buona visione!