Skip to content
Advertisement

Cant understand my syntax mistake in MySQL CREATE FUNCTION

This is my code and I can not find the mistake! I am trying to create a function that multiplies a value to de input parameter and returns that result! It should not be that difficult but I am not finding my sintaxt mistake

The mistake says: error code 1064

Advertisement

Answer

The DECLARE has to be before the code.

I also changed it tio deterministic

| Costotramite(1000) |
| -----------------: |
|                100 |

db<>fiddle here

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement