I am trying to debug a future trigger. I make an example of a contrived and very simple
begin IF (1<>0) THEN select * from aa.csv; ELSE select * from aa.csv; END IF; end But does not work returns an error
Unrecognized statement type. (near "begin" at position 0)
begin IF (1<>0) THEN select * from aa.csv# 1064 - You have an error in your SQL syntax; check the syntax to use the syntax to use the line if it is near (IF <1) THEN select * from aa.csv 'at line 2
At the same time, everything seems to work fine for others (the example was taken from the forum where everything works fine for a person) - the request seems to be simple to the point of dullness ...
Tell me why it does not work out?
MySQL 5.7