bonjour
j'essaie d'executer ma procedure stockée mais je n'arrive pas svp aidez moi à la corriger
voici ma procedure

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
CREATE PROCEDURE RechercherPoste
@numero NVARCHAR (50)
AS
BEGIN
DECLARE
@id BIGINT
BEGIN Tran
set @id =(Select identifiant from Poste WHERE numero=@numero)
IF @id is null
	BEGIN
	INSERT INTO Poste(numero) VALUES(@numero)
MySQL a répondu:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@numero NVARCHAR (50)
AS
BEGIN
DECLARE
@id BIGINT
BEGIN Tran
set @id =(Sel' at line 2
merci

Select identifiant from Poste WHERE numero=@numero
END
ELSE
BEGIN
Select identifiant from Poste WHERE numero=@numero

END
COMMIT TRAN
END