+ 1
What happens if, with SQL, I try to use the function SUM, AVG, POWER, and so on. In a column where a text value is conteined?
3 odpowiedzi
+ 1
Have you tested on your own?
I would've guessed an error message will be displayed, probably; considering those functions were meant for numeric data.
* A quick run on the 3 functions in db-fiddle however, resulted in all 0 (zero). Not sure whether that was their way to conceal error message or what.
+ 1
In sqlite the result for AVG and SUM is 0 (zero). For POWER query error: "no such function".
+ 1
In the case of software running using sum or average functions on columns of text:
The program will not run it will show you a typo
Point you to the error bar and wait for the error correction