Error # 1064 in CREATE PROCEDURE - PhpMyAdmin SQL

1

PhpMyAdmin message:

Mensagens do MySQL : Documentação
1064 - Você tem um erro de sintaxe no seu SQL próximo a '@NumeroSerie INT(11),
        @Velocidade TINYINT(4),
        @Direcao SMALLINT(6),
        @Latit' na linha 2

Code that is in error:

CREATE PROCEDURE SpRegistraMsgPosicionamento(
    @NumeroSerie INT(11),
    @Velocidade TINYINT(4),
    @Direcao SMALLINT(6),
    @Latitude DECIMAL(8,4),
    @Longitude DECIMAL(8,4)
)
AS BEGIN 
    INSERT INTO posicionamento(EquipamentoId, Velocidade, Direcao, Latitude, Longitude) 
    VALUES (@NumeroSerie, @Velocidade, @Direcao, @Latitude, @Longitude)
END
    
asked by anonymous 14.10.2018 / 00:42

2 answers

1

After hitting my head with that, I realized that I had to put IN

CREATE PROCEDURE 'SpRegistraMsgPosicionamento'(
    IN '@NumeroSerie' INT, 
    IN '@Velocidade' TINYINT, 
    IN '@Direcao' SMALLINT, 
    IN '@Latitude' DECIMAL(8,4), 
    IN '@Longitude' DECIMAL(8,4)
)
    
14.10.2018 / 01:37
0

See if it works out (I took from here ):

  

The 1064 error occurs because of the incompatibility of the MySQL version.   Different versions have different reserved words, which, if   are used by an earlier version, they cause the error.

     

The simplest and most effective solution to this is as follows: when using   phpMyadmin (accessible from your Control Panel), select the    "compatibility mode" and select the database version in the   menu. That's it! You should not receive the same error again.

    
14.10.2018 / 00:45