execute SQLServer and MySQL stored procedure from Java

0

good morning / afternoon / evening at the time you see this post the issue is that I do not know the syntax to call a SQLServer stored procedure from java example

//para llamar a un una sentencia insert/update/delete/select utilizo
PrepareStatement stInsert=con.PrepareStatement("INSERT INTO ejemplo VALUES(?,?,?)");

but how can I do for a stored procedure or what syntax does it have in both SQLServer and MySQL?

Thank you in advance

    
asked by Fernando De Jesus Basurto 22.07.2018 в 09:58
source

1 answer

0

You can use:

PrepareStatement stInsert=con.PrepareStatement("CALL dbo.stored_procedure()");

Here you can see some examples: link

link

link

    
answered by 22.07.2018 / 20:56
source