+ 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?

8th Apr 2020, 11:21 AM
Helios Fernandez Martinez
Helios Fernandez Martinez - avatar
3 Réponses
+ 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.
8th Apr 2020, 11:47 AM
Ipang
+ 1
In sqlite the result for AVG and SUM is 0 (zero). For POWER query error: "no such function".
8th Apr 2020, 2:02 PM
dozule
dozule - avatar
+ 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
12th Apr 2020, 10:52 AM
hodaya mazluminyan
hodaya mazluminyan - avatar