How to make a stored procedure in mySQL -


i'm quite new stored procedures in mysql , have been having trouble of homework have been assigned. it's asking me accept cust_code procedure parameter in database, , delete said customer cust_code. delete associated rows customer in tables 'invoice', 'line'.

to create procedure integer parameter this:

delimiter $$ create procedure `<procedure_name>`(in `in_cust_code` int)    begin       delete        ...       1         , `<table_name>`.`cust_code` = in_cust_code            ... end delimiter ; 

Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -