The parameter name of the mysql stored procedure should not be the same as the field name bitsCN.com
The parameter name of the mysql stored procedure should not be the same as the field name
For example, the result is that the parameter value will not be the value you passed in, but the value of the field in each record.
Such consequences are often serious. For example, you can delete all the records of the entire table.
This is my bloody price.
Do not skip the following:
[SQL] DELIMITER $ USE 'b10k' $ DROP PROCEDURE IF EXISTS 'sp _ delete_species '$ CREATE DEFINER = 'luth' @ '% 'procedure 'sp _ delete_species '( IN species_id INT, /* species ID */OUT out_rows INT/* affected rows */) begin delete from 'sample' WHERE 'species _ id' = species_id; delete from 'filepath' WHERE 'species _ id' = species_id; delete from 'species 'Where 'species _ id' = species_id; SET out_rows = ROW_COUNT (); END $ DELIMITER;
BitsCN.com